ruby-changes:52159
From: nobu <ko1@a...>
Date: Wed, 15 Aug 2018 11:05:25 +0900 (JST)
Subject: [ruby-changes:52159] nobu:r64367 (trunk): -Wsuggest-attribute=noreturn on io_spec_rb_io_wait_readable
nobu 2018-08-15 11:05:20 +0900 (Wed, 15 Aug 2018) New Revision: 64367 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64367 Log: -Wsuggest-attribute=noreturn on io_spec_rb_io_wait_readable Modified files: trunk/spec/ruby/optional/capi/ext/io_spec.c Index: spec/ruby/optional/capi/ext/io_spec.c =================================================================== --- spec/ruby/optional/capi/ext/io_spec.c (revision 64366) +++ spec/ruby/optional/capi/ext/io_spec.c (revision 64367) @@ -21,6 +21,7 @@ static int set_non_blocking(int fd) { https://github.com/ruby/ruby/blob/trunk/spec/ruby/optional/capi/ext/io_spec.c#L21 int flags = 1; return ioctl(fd, FIOBIO, &flags); #else +# define SET_NON_BLOCKING_FAILS_ALWAYS 1 errno = ENOSYS; return -1; #endif @@ -137,6 +138,10 @@ VALUE io_spec_rb_io_taint_check(VALUE se https://github.com/ruby/ruby/blob/trunk/spec/ruby/optional/capi/ext/io_spec.c#L138 #ifdef HAVE_RB_IO_WAIT_READABLE #define RB_IO_WAIT_READABLE_BUF 13 +#if SET_NON_BLOCKING_FAILS_ALWAYS +NORETURN(VALUE io_spec_rb_io_wait_readable(VALUE self, VALUE io, VALUE read_p)); +#endif + VALUE io_spec_rb_io_wait_readable(VALUE self, VALUE io, VALUE read_p) { int fd = io_spec_get_fd(io); char buf[RB_IO_WAIT_READABLE_BUF]; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/