1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2018-06-11 23:34:11 +00:00
parent 0534566839
commit c9b8a361be

View file

@ -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)