diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 16:39:27 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 16:39:27 +0000 |
commit | 52629237a522c7c146d788ddaaf69946fd2729f9 (patch) | |
tree | 552402b085cff37bc251fc0f45ed9255b53cdd57 /stdlib/tst-environ.c | |
parent | 3896c5809b49e72fbadc57da2189ff42aa2a5d02 (diff) | |
parent | 064374be911f72dfaec8a75f06da1f9fc1827712 (diff) |
Merge commit 'refs/top-bases/t/hurdsig-boot-fix' into t/hurdsig-boot-fix
Diffstat (limited to 'stdlib/tst-environ.c')
-rw-r--r-- | stdlib/tst-environ.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/stdlib/tst-environ.c b/stdlib/tst-environ.c index 6317d5121e..ffbb518b2e 100644 --- a/stdlib/tst-environ.c +++ b/stdlib/tst-environ.c @@ -1,4 +1,4 @@ -/* 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 @@ -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) |