summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-14 07:52:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-14 07:52:30 +0000
commit957e6e4b14db5954c416c958aa54a5ecc0d16410 (patch)
tree76d1c284ee316248bbe06be55ba9db9e7c93bdbd /string.c
parentc59f2b03821af677ffa52ce4ebb393ec06ebb43b (diff)
initialize variables
* string.c (rb_str_enumerate_lines): initialize conditionally used variable. * thread.c (rb_fd_no_init): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/string.c b/string.c
index b9bd9098da..7045d16f4f 100644
--- a/string.c
+++ b/string.c
@@ -7493,8 +7493,7 @@ rb_str_enumerate_lines(int argc, VALUE *argv, VALUE str, int wantarray)
const char *ptr, *pend, *subptr, *subend, *rsptr, *hit, *adjusted;
long pos, len, rslen;
int rsnewline = 0;
-
- VALUE MAYBE_UNUSED(ary);
+ VALUE ary = 0;
if (rb_scan_args(argc, argv, "01:", &rs, &opts) == 0)
rs = rb_rs;
@@ -7517,9 +7516,6 @@ rb_str_enumerate_lines(int argc, VALUE *argv, VALUE str, int wantarray)
wantarray = 0;
#endif
}
-#if defined __GNUC__ && !defined __clang__
- ASSUME(wantarray || !ary); /* if wantarray, ary does not matter */
-#endif
}
else {
if (wantarray)