aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/openat2/openat2_test.c
diff options
context:
space:
mode:
authorMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>2023-10-13 13:36:27 +0200
committerShuah Khan <skhan@linuxfoundation.org>2023-10-13 14:08:16 -0600
commit287d29827ffc97e6978fa030b7412330a93dd38a (patch)
treec5e27c0185655e9c2aa7656604aec553f6c6cd65 /tools/testing/selftests/openat2/openat2_test.c
parentselftests/cachestat: Fix print_cachestat format (diff)
downloadwireguard-linux-287d29827ffc97e6978fa030b7412330a93dd38a.tar.xz
wireguard-linux-287d29827ffc97e6978fa030b7412330a93dd38a.zip
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 <maciej.wieczor-retman@intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/openat2/openat2_test.c')
-rw-r--r--tools/testing/selftests/openat2/openat2_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/testing/selftests/openat2/openat2_test.c
index 7fb902099de4..9024754530b2 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