зеркало из https://github.com/github/ruby.git
Fix Issues reported by PVS-Studio static analyzer
* vm.c (vm_set_main_stack): remove unnecessary check. toplevel binding must be initialized. [Bug #12611] (N1) * win32/win32.c (w32_symlink): fix return type. [Bug #12611] (N3) * string.c (rb_str_split_m): simplify the condition. [Bug #12611](N4) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c6692d9410
Коммит
a325876ad3
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Fri Jul 22 19:55:20 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm.c (vm_set_main_stack): remove unnecessary check. toplevel
|
||||
binding must be initialized. [Bug #12611] (N1)
|
||||
|
||||
* win32/win32.c (w32_symlink): fix return type. [Bug #12611] (N3)
|
||||
|
||||
* string.c (rb_str_split_m): simplify the condition.
|
||||
[Bug #12611](N4)
|
||||
|
||||
Fri Jul 22 17:13:37 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* string.c (String#dump): Change escaping of non-ASCII characters in
|
||||
|
|
2
string.c
2
string.c
|
@ -7235,7 +7235,7 @@ rb_str_split_m(int argc, VALUE *argv, VALUE str)
|
|||
beg = start;
|
||||
}
|
||||
else {
|
||||
if (ptr+start == ptr+len)
|
||||
if (start == len)
|
||||
start++;
|
||||
else
|
||||
start += rb_enc_fast_mbclen(ptr+start,ptr+len,enc);
|
||||
|
|
2
vm.c
2
vm.c
|
@ -379,7 +379,7 @@ vm_set_main_stack(rb_thread_t *th, const rb_iseq_t *iseq)
|
|||
vm_set_eval_stack(th, iseq, 0, &env->block);
|
||||
|
||||
/* save binding */
|
||||
if (bind && iseq->body->local_size > 0) {
|
||||
if (iseq->body->local_size > 0) {
|
||||
bind->env = vm_make_env_object(th, th->cfp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4947,7 +4947,7 @@ w32_symlink(UINT cp, const char *src, const char *link)
|
|||
DWORD flag = 0;
|
||||
BOOLEAN ret;
|
||||
|
||||
typedef DWORD (WINAPI *create_symbolic_link_func)(WCHAR*, WCHAR*, DWORD);
|
||||
typedef BOOLEAN (WINAPI *create_symbolic_link_func)(WCHAR*, WCHAR*, DWORD);
|
||||
static create_symbolic_link_func create_symbolic_link =
|
||||
(create_symbolic_link_func)-1;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче