summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2020-11-25 18:06:36 -0800
committerJim Meyering <meyering@fb.com>2020-11-25 18:06:36 -0800
commit165b54bad07addb7fde64b0c15839dba2e92b791 (patch)
treec478fee2d8d14e1086c5a36918b27cc840a71887
parentf2a67f071d170920314c9a3b8de3e85259b4e010 (diff)
downloadgnulib-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--ChangeLog7
-rw-r--r--tests/test-raise.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7dbd31739d..bb3e664bec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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

Return to:

Send suggestions and report system problems to the System administrator.