linux-yocto/tools/testing/selftests/nolibc
Thomas Weißschuh 0a13f60c95 selftests/nolibc: avoid passing NULL to printf("%s")
[ Upstream commit f1a58f61d8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:21:41 +02:00
..
.gitignore selftests/nolibc: Avoid generated files being committed 2022-08-31 05:17:45 -07:00
Makefile selftests/nolibc: add a "help" target 2022-08-31 05:17:45 -07:00
nolibc-test.c selftests/nolibc: avoid passing NULL to printf("%s") 2024-10-17 15:21:41 +02:00