summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-01-19 14:33:37 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-01-19 14:33:37 +0100
commit723719b41348e275c760c6c66bbc9619fafa37fe (patch)
tree51300326de0e92f77d58983259699dd697251c51 /setup_native
parent011ce226e89ecabaf621603d692547c88061eaba (diff)
Silence -Werror=nonnull (GCC 6)
Change-Id: I3aa5f4342ad362b0075d033df222467723ee002e
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/scripts/source/getuid.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/setup_native/scripts/source/getuid.c b/setup_native/scripts/source/getuid.c
index 9a9f826fa3ab..2f1aaa45abe7 100644
--- a/setup_native/scripts/source/getuid.c
+++ b/setup_native/scripts/source/getuid.c
@@ -123,7 +123,15 @@ int __lxstat(int n, const char *path, struct stat *buf)
p_lstat = (int (*)(int n, const char *path, struct stat *buf))
dlsym (RTLD_NEXT, "__lxstat");
ret = (*p_lstat)(n, path, buf);
+#if defined __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnonnull"
+ // __lxstat may be declared in system headers as taking nonnull argument
+#endif
assert(buf != NULL);
+#if defined __GNUC__
+#pragma GCC diagnostic pop
+#endif
buf->st_uid = 0; /* root */
buf->st_gid = 0; /* root */
return ret;