[Libreoffice-commits] core.git: setup_native/scripts
Stephan Bergmann
sbergman at redhat.com
Tue Jan 19 05:34:08 PST 2016
setup_native/scripts/source/getuid.c | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 723719b41348e275c760c6c66bbc9619fafa37fe
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 19 14:33:37 2016 +0100
Silence -Werror=nonnull (GCC 6)
Change-Id: I3aa5f4342ad362b0075d033df222467723ee002e
diff --git a/setup_native/scripts/source/getuid.c b/setup_native/scripts/source/getuid.c
index 9a9f826..2f1aaa4 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;
More information about the Libreoffice-commits
mailing list