Mercurial > hg > octave-lyh > gnulib-hg
changeset 15849:6e98e4b89a4f
raise tests: Avoid a GCC warning.
* tests/test-raise.c (handler): Use _Noreturn.
author | Bernhard Voelker <mail@bernhard-voelker.de> |
---|---|
date | Fri, 07 Oct 2011 11:37:31 +0200 |
parents | 0dd7e4732abc |
children | 8acd9d76c20c |
files | ChangeLog tests/test-raise.c |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-10-07 Bernhard Voelker <mail@bernhard-voelker.de> + + raise tests: Avoid a GCC warning. + * tests/test-raise.c (handler): Use _Noreturn. + 2011-10-07 Bruno Haible <bruno@clisp.org> Tests for module 'ldexpf'.
--- a/tests/test-raise.c +++ b/tests/test-raise.c @@ -25,7 +25,10 @@ #include "macros.h" -static void +/* It is safe to use _Noreturn here: exit() never returns, and GCC knows that + exit() is a non-returning function, even on platforms where its declaration + in <stdlib.h> does not have the 'noreturn' attribute. */ +static _Noreturn void handler (int sig) { exit (0);