about summary refs log tree commit diff homepage
path: root/cmake
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2022-03-18 09:46:14 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2022-07-07 18:30:34 +0100
commitd2f5906da4ae37a41ae257e5308d50e19689877b (patch)
tree40bb75bc1153dbf37f0df31674cf67e4af3c4da3 /cmake
parent99c522b14dbbf6b26be35b6e7bb8da7b29070287 (diff)
downloadklee-d2f5906da4ae37a41ae257e5308d50e19689877b.tar.gz
POSIX runtime: fstatat: check for nonnull path APIs
Diffstat (limited to 'cmake')
-rw-r--r--cmake/fstatat.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/fstatat.c b/cmake/fstatat.c
new file mode 100644
index 00000000..58aa9301
--- /dev/null
+++ b/cmake/fstatat.c
@@ -0,0 +1,9 @@
+#include <fcntl.h>
+#include <stddef.h>
+#include <sys/stat.h>
+
+int main(void) {
+  struct stat buf;
+  #pragma GCC diagnostic error "-Wnonnull"
+  fstatat(0, NULL, &buf, 0);
+}