* tests/test-sigpipe.c (handler): Invoke _exit, not exit.
* tests/test-raise.c (handler): Update comments after 2020-11-25 change.
2023-09-04 Bruno Haible <bruno@clisp.org>
+ sigpipe tests: Fix -Wanalyzer-unsafe-call-within-signal-handler warning.
+ * tests/test-sigpipe.c (handler): Invoke _exit, not exit.
+ * tests/test-raise.c (handler): Update comments after 2020-11-25 change.
+
argp: Fix gcc -Wanalyzer-use-of-uninitialized-value warning.
* lib/argp-help.c (hol_find_entry): Access hol->entries only after
having verified that hol->num_entries > 0.
#include "macros.h"
-/* 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. */
+/* 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 <unistd.h> does not have the 'noreturn' attribute. */
static _Noreturn void
handler (int sig)
{
static void
handler (int sig)
{
- exit (0);
+ _exit (0);
}
int