blob: 06d86af388fd8eedf31e32cc7076540992168299 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* Test that passing NULL to a parameter marked as nonnull works correctly
* SPDX-License-Identifier: LGPL-2.1-only
*
*/
#define _GNU_SOURCE
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
// Passing a null pointer is the test scenario
#pragma GCC diagnostic ignored "-Wnonnull"
int main(void) {
if (statx(0, NULL, 0, 0, NULL) != -1) {
return 1;
}
return 0;
}
|