mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)
(rb_str_enumerate_lines): suppress "may be used uninitialized in this function" warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f150ed1532
commit
6746eecaf1
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Nov 26 17:10:04 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)
|
||||
(rb_str_enumerate_lines): suppress "may be used uninitialized in
|
||||
this function" warning.
|
||||
|
||||
Mon Nov 26 17:00:12 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* vm_core.h (rb_thread_struct): added 'in_trap' member for marking
|
||||
|
|
6
string.c
6
string.c
|
@ -6109,7 +6109,7 @@ rb_str_enumerate_lines(int argc, VALUE *argv, VALUE str, int wantarray)
|
|||
VALUE line;
|
||||
int n;
|
||||
VALUE orig = str;
|
||||
VALUE ary;
|
||||
VALUE UNINITIALIZED_VAR(ary);
|
||||
|
||||
if (argc == 0) {
|
||||
rs = rb_rs;
|
||||
|
@ -6396,7 +6396,7 @@ rb_str_enumerate_chars(VALUE str, int wantarray)
|
|||
long i, len, n;
|
||||
const char *ptr;
|
||||
rb_encoding *enc;
|
||||
VALUE ary;
|
||||
VALUE UNINITIALIZED_VAR(ary);
|
||||
|
||||
if (rb_block_given_p()) {
|
||||
if (wantarray) {
|
||||
|
@ -6494,7 +6494,7 @@ rb_str_enumerate_codepoints(VALUE str, int wantarray)
|
|||
unsigned int c;
|
||||
const char *ptr, *end;
|
||||
rb_encoding *enc;
|
||||
VALUE ary;
|
||||
VALUE UNINITIALIZED_VAR(ary);
|
||||
|
||||
if (single_byte_optimizable(str))
|
||||
return rb_str_enumerate_bytes(str, wantarray);
|
||||
|
|
Loading…
Reference in a new issue