summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-18 04:42:58 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-18 04:42:58 (GMT)
commitf8a2398a86ce64858584fc3281ad40c01a5342d1 (patch)
tree7d17f1bf71a460aeac884d9ef1bc92f0b2f1e214 /thread.c
parent02bb538c3dcba02a536b5be900868b2ad673f8cb (diff)
thread.c: suppress warnings only if GCC6+
* thread.c (rb_fd_no_init): suppress warnings by applying ASSUME only if GCC 6 or lator, to get rid of freeze with GCC 4.7.2-5. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 1d8ea96..dfbcfcb 100644
--- a/thread.c
+++ b/thread.c
@@ -3404,7 +3404,9 @@ rb_fd_select(int n, rb_fdset_t *readfds, rb_fdset_t *writefds, rb_fdset_t *excep
return select(n, r, w, e, timeout);
}
+#if defined __GNUC__ && __GNUC__ >= 6
#define rb_fd_no_init(fds) ASSUME(!(fds)->maxfd)
+#endif
#undef FD_ZERO
#undef FD_SET