From 97e05dad7ffca0d2fd496fb8e33ddcd7def6748b Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 24 Jul 2018 05:38:07 +0000 Subject: UNREACHABLE_RETURN * include/ruby/ruby.h (UNREACHABLE_RETURN): UNREACHABLE at the end of non-void functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/option.c | 4 ++-- ext/socket/raddrinfo.c | 2 +- ext/socket/socket.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/socket') diff --git a/ext/socket/option.c b/ext/socket/option.c index bf3af171a2..5ad44cdcd8 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -424,7 +424,7 @@ sockopt_ipv4_multicast_loop(VALUE self) } #endif rb_raise(rb_eTypeError, "ipv4_multicast_loop socket option expected"); - UNREACHABLE; + UNREACHABLE_RETURN(Qnil); } #define inspect_ipv4_multicast_loop(a,b,c,d) \ @@ -475,7 +475,7 @@ sockopt_ipv4_multicast_ttl(VALUE self) } #endif rb_raise(rb_eTypeError, "ipv4_multicast_ttl socket option expected"); - UNREACHABLE; + UNREACHABLE_RETURN(Qnil); } #define inspect_ipv4_multicast_ttl(a,b,c,d) \ diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index 41db6960ad..4c6a9b511c 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -2550,7 +2550,7 @@ rsock_io_socket_addrinfo(VALUE io, struct sockaddr *addr, socklen_t len) rb_raise(rb_eTypeError, "neither IO nor file descriptor"); } - UNREACHABLE; + UNREACHABLE_RETURN(Qnil); } /* diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 8846770097..ead3592d8a 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -1381,7 +1381,7 @@ sock_s_getnameinfo(int argc, VALUE *argv) errno = saved_errno; rsock_raise_socket_error("getnameinfo", error); - UNREACHABLE; + UNREACHABLE_RETURN(Qnil); } /* -- cgit v1.2.3