diff options
author | Zhangjin Wu <falcon@tinylab.org> | 2023-07-08 02:23:45 +0800 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2023-08-23 04:38:02 +0200 |
commit | 46cf630c53f359bb9cfe7f487c3a878068fd373d (patch) | |
tree | f3d985503547c458788df189b79c6590f20abab8 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | cfb672f94f6e42ed8a472a1340afc2b41d265731 (diff) |
selftests/nolibc: stat_fault: silence NULL argument warning with glibc
Use another invalid address (void *)1 instead of NULL to silence this
compile warning with glibc:
$ make libc-test
CC libc-test
nolibc-test.c: In function ‘run_syscall’:
nolibc-test.c:622:49: warning: null argument where non-null required (argument 1) [-Wnonnull]
622 | CASE_TEST(stat_fault); EXPECT_SYSER(1, stat(NULL, &stat_buf), -1, EFAULT); break;
| ^~~~
nolibc-test.c:304:79: note: in definition of macro ‘EXPECT_SYSER2’
304 | do { if (!cond) pad_spc(llen, 64, "[SKIPPED]\n"); else ret += expect_syserr2(expr, expret, experr1, experr2, llen); } while (0)
| ^~~~
nolibc-test.c:622:33: note: in expansion of macro ‘EXPECT_SYSER’
622 | CASE_TEST(stat_fault); EXPECT_SYSER(1, stat(NULL, &stat_buf), -1, EFAULT); break;
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions