aboutsummaryrefslogtreecommitdiff
path: root/malloc/tst-mallocfork.c
diff options
context:
space:
mode:
Diffstat (limited to 'malloc/tst-mallocfork.c')
-rw-r--r--malloc/tst-mallocfork.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/malloc/tst-mallocfork.c b/malloc/tst-mallocfork.c
index 4ff6ec09f4..00851a16c3 100644
--- a/malloc/tst-mallocfork.c
+++ b/malloc/tst-mallocfork.c
@@ -7,6 +7,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <libc-diag.h>
static void
sig_handler (int signum)
@@ -25,7 +26,12 @@ do_test (void)
struct sigaction action = { .sa_handler = sig_handler };
sigemptyset (&action.sa_mask);
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_NEEDS_COMMENT (10, "-Wunused-result");
+ /* The result of malloc is deliberately ignored, so do not warn
+ about that. */
malloc (sizeof (int));
+ DIAG_POP_NEEDS_COMMENT;
if (sigaction (SIGALRM, &action, NULL) != 0)
{