diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-15 12:53:45 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-15 12:53:45 +0000 |
commit | 50ad0995905996045a1a3d7cf851abe230e6e94f (patch) | |
tree | 793b25e59bb8d9037dfaf9414cf1f5e8acdb1ec6 | |
parent | 9071cd639308d849c455d0e4dc93ca428647b4c4 (diff) |
spec/ruby/optional/capi/ext/io_spec.c: guard unreachable code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | spec/ruby/optional/capi/ext/io_spec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/optional/capi/ext/io_spec.c b/spec/ruby/optional/capi/ext/io_spec.c index 224b1fe513..955fe11e7d 100644 --- a/spec/ruby/optional/capi/ext/io_spec.c +++ b/spec/ruby/optional/capi/ext/io_spec.c @@ -144,8 +144,10 @@ NORETURN(VALUE io_spec_rb_io_wait_readable(VALUE self, VALUE io, VALUE read_p)); VALUE io_spec_rb_io_wait_readable(VALUE self, VALUE io, VALUE read_p) { int fd = io_spec_get_fd(io); +# if !SET_NON_BLOCKING_FAILS_ALWAYS char buf[RB_IO_WAIT_READABLE_BUF]; int ret, saved_errno; +# endif if (set_non_blocking(fd) == -1) rb_sys_fail("set_non_blocking failed"); @@ -173,6 +175,8 @@ VALUE io_spec_rb_io_wait_readable(VALUE self, VALUE io, VALUE read_p) { } return ret ? Qtrue : Qfalse; +# else + UNREACHABLE; # endif } #endif |