diff options
author | Jim Meyering <meyering@fb.com> | 2020-11-25 18:06:36 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2020-11-25 18:06:36 -0800 |
commit | 165b54bad07addb7fde64b0c15839dba2e92b791 (patch) | |
tree | c478fee2d8d14e1086c5a36918b27cc840a71887 | |
parent | f2a67f071d170920314c9a3b8de3e85259b4e010 (diff) | |
download | gnulib-165b54bad07addb7fde64b0c15839dba2e92b791.tar.gz gnulib-165b54bad07addb7fde64b0c15839dba2e92b791.tar.bz2 |
raise-tests: avoid GCC 11's new exit-from-signal-handler warning
gcc's -Wanalyzer-unsafe-call-within-signal-handler exposed this.
* tests/test-raise.c: Include unistd.h.
(handler): Use _exit, not exit.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | tests/test-raise.c | 3 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,10 @@ +2020-11-25 Jim Meyering <meyering@fb.com> + + raise-tests: avoid GCC 11's new exit-from-signal-handler warning + gcc's -Wanalyzer-unsafe-call-within-signal-handler exposed this. + * tests/test-raise.c: Include unistd.h. + (handler): Use _exit, not exit. + 2020-11-23 Bruno Haible <bruno@clisp.org> Use the correct printf format attribute for mingw. diff --git a/tests/test-raise.c b/tests/test-raise.c index 9135623294..b71bd5a540 100644 --- a/tests/test-raise.c +++ b/tests/test-raise.c @@ -17,6 +17,7 @@ #include <config.h> #include <signal.h> +#include <unistd.h> #include "signature.h" SIGNATURE_CHECK (raise, int, (int)); @@ -31,7 +32,7 @@ SIGNATURE_CHECK (raise, int, (int)); static _Noreturn void handler (int sig) { - exit (0); + _exit (0); } int |