diff --git a/ChangeLog b/ChangeLog index 065612a235..de2e739447 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon May 23 12:21:18 2016 NARUSE, Yui + + * array.c (rb_ary_fill): suppress warnings: 'item' may be used + uninitialized in this function + Mon May 23 07:41:49 2016 Eric Wong * dir.c (dir_close): update RDoc for 2.3 #close change diff --git a/array.c b/array.c index 11fba55029..6f1d65a88e 100644 --- a/array.c +++ b/array.c @@ -3520,12 +3520,10 @@ rb_ary_clear(VALUE ary) static VALUE rb_ary_fill(int argc, VALUE *argv, VALUE ary) { - VALUE item, arg1, arg2; + VALUE item = Qundef, arg1, arg2; long beg = 0, end = 0, len = 0; - int block_p = FALSE; if (rb_block_given_p()) { - block_p = TRUE; rb_scan_args(argc, argv, "02", &arg1, &arg2); argc += 1; /* hackish */ } @@ -3567,7 +3565,7 @@ rb_ary_fill(int argc, VALUE *argv, VALUE ary) ARY_SET_LEN(ary, end); } - if (block_p) { + if (item == Qundef) { VALUE v; long i;