mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
add UNREACHABLE_RETURN
Not every compilers understand that rb_raise does not return. When a function does not end with a return statement, such compilers can issue warnings. We would better tell them about reachabilities.
This commit is contained in:
parent
c8dc2bf140
commit
de3e931df7
Notes:
git
2020-06-29 11:06:32 +09:00
14 changed files with 24 additions and 1 deletions
1
signal.c
1
signal.c
|
@ -274,6 +274,7 @@ signm2signo(VALUE *sig_ptr, int negative, int exit, int *prefix_ptr)
|
|||
}
|
||||
rb_raise(rb_eArgError, "unsupported signal `%.*s%"PRIsVALUE"'",
|
||||
prefix, signame_prefix, vsig);
|
||||
UNREACHABLE_RETURN(0);
|
||||
}
|
||||
|
||||
static const char*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue