summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-13 05:44:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-13 05:44:15 +0000
commit959aac29e74547e98a83325e765c0cc9e57f50ca (patch)
tree2a7a409a2b336c73e8260280231598f80f2c6b54 /string.c
parent5c0aa3ad92eab5a1d4b4e5d98b128823858e21ac (diff)
suppress warnings
* string.c (rb_str_enumerate_lines): hint to suppress a maybe-uninitialized warning by gcc. * thread.c (rb_fd_no_init): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/string.c b/string.c
index d894b24daf..b9bd9098da 100644
--- a/string.c
+++ b/string.c
@@ -7517,6 +7517,9 @@ 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)