ruby-changes:51429
From: nobu <ko1@a...>
Date: Tue, 12 Jun 2018 08:34:15 +0900 (JST)
Subject: [ruby-changes:51429] nobu:r63635 (trunk): intern.h: suppress warnings
nobu 2018-06-12 08:34:11 +0900 (Tue, 12 Jun 2018) New Revision: 63635 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63635 Log: intern.h: suppress warnings * include/ruby/intern.h (rb_fd_select): turned into an inline function, to suppress -Waddress warnings. Modified files: trunk/include/ruby/intern.h Index: include/ruby/intern.h =================================================================== --- include/ruby/intern.h (revision 63634) +++ include/ruby/intern.h (revision 63635) @@ -335,7 +335,15 @@ void rb_fd_set(int, rb_fdset_t *); https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L335 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/