From: Maciej Wieczor-Retman Date: Fri, 13 Oct 2023 11:36:27 +0000 (+0200) Subject: selftests/openat2: Fix wrong format specifier X-Git-Tag: v6.7-rc1~119^2~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=287d29827ffc97e6978fa030b7412330a93dd38a;p=thirdparty%2Flinux.git selftests/openat2: Fix wrong format specifier Compiling openat2 selftest after adding a __printf() attribute to ksft_print_msg() exposes a -Wformat warning in test_openat2_flags(). The wrong format specifier is used for printing test.how->flags variable. Change the format specifier to %llX so it matches the printed variable. Signed-off-by: Maciej Wieczor-Retman Reviewed-by: Ilpo Järvinen Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/testing/selftests/openat2/openat2_test.c index 7fb902099de45..9024754530b23 100644 --- a/tools/testing/selftests/openat2/openat2_test.c +++ b/tools/testing/selftests/openat2/openat2_test.c @@ -300,7 +300,7 @@ void test_openat2_flags(void) ksft_print_msg("openat2 unexpectedly returned "); if (fdpath) - ksft_print_msg("%d['%s'] with %X (!= %X)\n", + ksft_print_msg("%d['%s'] with %X (!= %llX)\n", fd, fdpath, fdflags, test->how.flags); else