diff --git a/ChangeLog b/ChangeLog index 35a8f72918..e2a1a07b47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Nov 26 17:10:04 2012 KOSAKI Motohiro + + * 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 * vm_core.h (rb_thread_struct): added 'in_trap' member for marking diff --git a/string.c b/string.c index 82c709ca1d..fcbffdc37b 100644 --- a/string.c +++ b/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);