-/* Copyright (C) 1999-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+#include <libc-diag.h>
#define VAR "FOOBAR"
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)