summaryrefslogtreecommitdiff
path: root/thread.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 /thread.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 'thread.c')
-rw-r--r--thread.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/thread.c b/thread.c
index e1968c44d2..39fdf9d23d 100644
--- a/thread.c
+++ b/thread.c
@@ -3573,9 +3573,7 @@ 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__ >= 5
-# define rb_fd_no_init(fds) ASSUME(!(fds)->fdset && !(fds)->maxfd)
-#endif
+#define rb_fd_no_init(fds) (((fds)->fdset = 0), ((fds)->maxfd = 0))
#undef FD_ZERO
#undef FD_SET
@@ -3640,9 +3638,7 @@ rb_fd_set(int fd, rb_fdset_t *set)
#define FD_CLR(i, f) rb_fd_clr((i), (f))
#define FD_ISSET(i, f) rb_fd_isset((i), (f))
-#if defined __GNUC__ && __GNUC__ >= 5
-# define rb_fd_no_init(fds) ASSUME(!(fds)->fdset)
-#endif
+#define rb_fd_no_init(fds) ((fds)->fdset = 0)
#endif