diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/-test-/iter/break.c | 3 | ||||
-rw-r--r-- | ext/openssl/ossl_pkey.c | 3 | ||||
-rw-r--r-- | ext/pty/pty.c | 3 | ||||
-rw-r--r-- | ext/readline/readline.c | 3 | ||||
-rw-r--r-- | ext/stringio/stringio.c | 3 |
5 files changed, 10 insertions, 5 deletions
diff --git a/ext/-test-/iter/break.c b/ext/-test-/iter/break.c index 78c7da6491..b72440f838 100644 --- a/ext/-test-/iter/break.c +++ b/ext/-test-/iter/break.c @@ -4,7 +4,8 @@ static VALUE iter_break_value(VALUE self, VALUE val) { rb_iter_break_value(val); - return self; /* not reached */ + + UNREACHABLE; } void diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c index 15a2eed8d2..0004d9d9b5 100644 --- a/ext/openssl/ossl_pkey.c +++ b/ext/openssl/ossl_pkey.c @@ -98,7 +98,8 @@ ossl_pkey_new(EVP_PKEY *pkey) default: ossl_raise(ePKeyError, "unsupported key type"); } - return Qnil; /* not reached */ + + UNREACHABLE; } VALUE diff --git a/ext/pty/pty.c b/ext/pty/pty.c index d7e6f3d8bb..de5cbf79e2 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -687,7 +687,8 @@ pty_check(int argc, VALUE *argv, VALUE self) if (!RTEST(exc)) return rb_last_status_get(); raise_from_check(cpid, status); - return Qnil; /* not reached */ + + UNREACHABLE; } static VALUE cPTY; diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 77acfdf517..e550782c5d 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -1379,7 +1379,8 @@ rb_remove_history(int index) return Qnil; #else rb_notimplement(); - return Qnil; /* not reached */ + + UNREACHABLE; #endif } diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 54d36c96a8..89fe5dab72 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -287,7 +287,8 @@ strio_unimpl(int argc, VALUE *argv, VALUE self) { StringIO(self); rb_notimplement(); - return Qnil; /* not reached */ + + UNREACHABLE; } /* |