aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-11 23:34:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-11 23:34:11 +0000
commite9e64d17f785a7a35e00b7ebd0deffa13e627803 (patch)
tree348a05a8ad3faff74f82e96726de0701af8a1b93 /include
parent5e929274207e665fb905e9a1445f8cdbe38bc6e9 (diff)
downloadruby-e9e64d17f785a7a35e00b7ebd0deffa13e627803.tar.gz
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')
-rw-r--r--include/ruby/intern.h10
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)