Home
last modified time | relevance | path

Searched hist:"46 cf630c53f359bb9cfe7f487c3a878068fd373d" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/tools/testing/selftests/nolibc/
H A Dnolibc-test.cdiff 46cf630c53f359bb9cfe7f487c3a878068fd373d Fri Jul 07 13:23:45 CDT 2023 Zhangjin Wu <falcon@tinylab.org> 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>