diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-11 23:34:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-11 23:34:11 +0000 |
commit | c9b8a361bea54f8913d58cfb4832afff04e61860 (patch) | |
tree | 348a05a8ad3faff74f82e96726de0701af8a1b93 /include/ruby/intern.h | |
parent | 053456683901317bfd3207c93e0691a32d2948d9 (diff) |
intern.h: suppress warnings
* include/ruby/intern.h (rb_fd_select): turned into an inline
function, to suppress -Waddress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/intern.h')
-rw-r--r-- | include/ruby/intern.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h index ae00b9ba89..f071486458 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -335,7 +335,15 @@ void rb_fd_set(int, rb_fdset_t *); void rb_w32_fd_copy(rb_fdset_t *, const fd_set *, int); #define rb_fd_dup(d, s) rb_w32_fd_dup((d), (s)) void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src); -#define rb_fd_select(n, rfds, wfds, efds, timeout) rb_w32_select((n), (rfds) ? ((rb_fdset_t*)(rfds))->fdset : NULL, (wfds) ? ((rb_fdset_t*)(wfds))->fdset : NULL, (efds) ? ((rb_fdset_t*)(efds))->fdset: NULL, (timeout)) +static inline int +rb_fd_select(int n, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout) +{ + return rb_w32_select(n, + rfds ? rfds->fdset : NULL, + wfds ? wfds->fdset : NULL, + efds ? efds->fdset : NULL, + timeout); +} #define rb_fd_resize(n, f) ((void)(f)) #define rb_fd_ptr(f) ((f)->fdset) |