From: Jim Meyering Date: Thu, 26 Nov 2020 02:06:36 +0000 (-0800) Subject: raise-tests: avoid GCC 11's new exit-from-signal-handler warning X-Git-Tag: v1.0~3469 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=165b54bad07addb7fde64b0c15839dba2e92b791;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 7dbd31739d..bb3e664bec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2020-11-25 Jim Meyering + + 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 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 #include +#include #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