1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* array.c (rb_ary_fill): suppress warnings: 'item' may be used

uninitialized in this function

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2016-05-23 03:23:24 +00:00
parent f00ec4fb38
commit cb2a99822e
2 changed files with 7 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Mon May 23 12:21:18 2016 NARUSE, Yui <naruse@ruby-lang.org>
* array.c (rb_ary_fill): suppress warnings: 'item' may be used
uninitialized in this function
Mon May 23 07:41:49 2016 Eric Wong <e@80x24.org>
* dir.c (dir_close): update RDoc for 2.3 #close change

View file

@ -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;