Skip to content

Commit

Permalink
thread.c: suppress warnings only if GCC6+
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Sep 18, 2015
1 parent 02bb538 commit f8a2398
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thread.c
Expand Up @@ -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
Expand Down

0 comments on commit f8a2398

Please sign in to comment.