summaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/bug-getcontext.c2
-rw-r--r--stdlib/tst-environ.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/stdlib/bug-getcontext.c b/stdlib/bug-getcontext.c
index c4072129a6..163400acba 100644
--- a/stdlib/bug-getcontext.c
+++ b/stdlib/bug-getcontext.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <ucontext.h>
-#include <libc-internal.h>
+#include <libc-diag.h>
static int
do_test (void)
diff --git a/stdlib/tst-environ.c b/stdlib/tst-environ.c
index 6a29fed62a..b2301641f5 100644
--- a/stdlib/tst-environ.c
+++ b/stdlib/tst-environ.c
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+#include <libc-diag.h>
#define VAR "FOOBAR"
@@ -196,12 +196,17 @@ do_test (void)
result = 1;
}
+ /* This deliberately tests supplying a null pointer to a function whose
+ argument is marked __attribute__ ((nonnull)). */
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_NEEDS_COMMENT(5, "-Wnonnull");
errno = 0;
if (unsetenv (NULL) >= 0 || errno != EINVAL)
{
puts ("unsetenv #1 failed");
result = 1;
}
+ DIAG_POP_NEEDS_COMMENT;
errno = 0;
if (unsetenv ("") >= 0 || errno != EINVAL)