| 1 | Disable -Werror=nonnull on getcwd(0, 4096) because GCC incorrectly warns that
|
| 2 | the second argument should be NULL with recent glibc. See:
|
| 3 |
|
| 4 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96832
|
| 5 | https://sourceware.org/bugzilla/show_bug.cgi?id=26545
|
| 6 |
|
| 7 | diff --git a/nss/coreconf/nsinstall/nsinstall.c b/nss/coreconf/nsinstall/nsinstall.c
|
| 8 | |
| 9 | |
| 10 | @@ -236,14 +236,20 @@ main(int argc, char **argv)
|
| 11 | return 0;
|
| 12 |
|
| 13 | if (!cwd) {
|
| 14 | +#pragma GCC diagnostic push
|
| 15 | +#pragma GCC diagnostic ignored "-Wnonnull"
|
| 16 | cwd = GETCWD(0, PATH_MAX);
|
| 17 | +#pragma GCC diagnostic pop
|
| 18 | if (!cwd)
|
| 19 | fail("could not get CWD");
|
| 20 | }
|
| 21 |
|
| 22 | /* make sure we can get into todir. */
|
| 23 | xchdir(todir);
|
| 24 | +#pragma GCC diagnostic push
|
| 25 | +#pragma GCC diagnostic ignored "-Wnonnull"
|
| 26 | todir = GETCWD(0, PATH_MAX);
|
| 27 | +#pragma GCC diagnostic pop
|
| 28 | if (!todir)
|
| 29 | fail("could not get CWD in todir");
|
| 30 | tdlen = strlen(todir);
|