summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-24 05:38:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-24 05:38:07 +0000
commit97e05dad7ffca0d2fd496fb8e33ddcd7def6748b (patch)
tree57675d82b85ab2681511240e35b190fc91905dd5 /ext
parentc78945751f5ea43d6dea732b9d3b5283c2710bce (diff)
downloadruby-97e05dad7ffca0d2fd496fb8e33ddcd7def6748b.tar.gz
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
Diffstat (limited to 'ext')
-rw-r--r--ext/-test-/exception/enc_raise.c2
-rw-r--r--ext/-test-/iter/break.c4
-rw-r--r--ext/-test-/string/coderange.c2
-rw-r--r--ext/pty/pty.c2
-rw-r--r--ext/readline/readline.c2
-rw-r--r--ext/ripper/eventids2.c2
-rw-r--r--ext/socket/option.c4
-rw-r--r--ext/socket/raddrinfo.c2
-rw-r--r--ext/socket/socket.c2
9 files changed, 11 insertions, 11 deletions
diff --git a/ext/-test-/exception/enc_raise.c b/ext/-test-/exception/enc_raise.c
index dc8a42cf3f..68d7b4ebc1 100644
--- a/ext/-test-/exception/enc_raise.c
+++ b/ext/-test-/exception/enc_raise.c
@@ -5,7 +5,7 @@ static VALUE
enc_raise(VALUE exc, VALUE encoding, VALUE mesg)
{
rb_enc_raise(rb_to_encoding(encoding), exc, "%s", StringValueCStr(mesg));
- UNREACHABLE;
+ UNREACHABLE_RETURN(Qnil);
}
void
diff --git a/ext/-test-/iter/break.c b/ext/-test-/iter/break.c
index 66ed26a9b8..4d43c5d0cf 100644
--- a/ext/-test-/iter/break.c
+++ b/ext/-test-/iter/break.c
@@ -5,7 +5,7 @@ iter_break(VALUE self)
{
rb_iter_break();
- UNREACHABLE;
+ UNREACHABLE_RETURN(Qnil);
}
static VALUE
@@ -13,7 +13,7 @@ iter_break_value(VALUE self, VALUE val)
{
rb_iter_break_value(val);
- UNREACHABLE;
+ UNREACHABLE_RETURN(Qnil);
}
void
diff --git a/ext/-test-/string/coderange.c b/ext/-test-/string/coderange.c
index df83fb5d44..1342ce20da 100644
--- a/ext/-test-/string/coderange.c
+++ b/ext/-test-/string/coderange.c
@@ -17,7 +17,7 @@ coderange_int2sym(int coderange)
return sym_broken;
}
rb_bug("wrong condition of coderange");
- UNREACHABLE;
+ UNREACHABLE_RETURN(Qnil);
}
/* return coderange without scan */
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 1ac89061c1..1a70bf7b61 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -665,7 +665,7 @@ pty_check(int argc, VALUE *argv, VALUE self)
if (!RTEST(exc)) return rb_last_status_get();
raise_from_check(cpid, status);
- UNREACHABLE;
+ UNREACHABLE_RETURN(Qnil);
}
static VALUE cPTY;
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 10ff0cbacd..47df49ed1c 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -1756,7 +1756,7 @@ rb_remove_history(int index)
#else
rb_notimplement();
- UNREACHABLE;
+ UNREACHABLE_RETURN(Qnil);
#endif
}
diff --git a/ext/ripper/eventids2.c b/ext/ripper/eventids2.c
index 334d9f557b..e876e95ab3 100644
--- a/ext/ripper/eventids2.c
+++ b/ext/ripper/eventids2.c
@@ -303,5 +303,5 @@ ripper_token2eventid(int tok)
}
rb_raise(rb_eRuntimeError, "[Ripper FATAL] unknown token %d", tok);
- UNREACHABLE;
+ UNREACHABLE_RETURN(0);
}
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);
}
/*