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:
卜部昌平 2020-06-24 16:23:59 +09:00
parent c8dc2bf140
commit de3e931df7
Notes: git 2020-06-29 11:06:32 +09:00
14 changed files with 24 additions and 1 deletions

View file

@ -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*