mirror_ubuntu-kernels/tools/testing/selftests/nolibc
Thomas Weißschuh f1a58f61d8 selftests/nolibc: avoid passing NULL to printf("%s")
Clang on higher optimization levels detects that NULL is passed to
printf("%s") and warns about it.
While printf() from nolibc gracefully handles that NULL,
it is undefined behavior as per POSIX, so the warning is reasonable.
Avoid the warning by transforming NULL into a non-NULL placeholder.

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-8-c20f2f5fc7c2@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
2024-08-12 22:22:13 +02:00
..
.gitignore selftests/nolibc: add script to run testsuite 2023-12-11 22:38:17 +01:00
Makefile selftests/nolibc: report failure if no testcase passed 2024-08-12 22:22:13 +02:00
nolibc-test-linkage.c selftests/nolibc: add tests for multi-object linkage 2023-10-12 21:14:20 +02:00
nolibc-test-linkage.h selftests/nolibc: add tests for multi-object linkage 2023-10-12 21:14:20 +02:00
nolibc-test.c selftests/nolibc: avoid passing NULL to printf("%s") 2024-08-12 22:22:13 +02:00
run-tests.sh selftests/nolibc: run-tests.sh: use -Werror by default 2024-06-29 09:44:54 +02:00