Skip to content

Commit 287d298

Browse files
maciejwieczorretmanshuahkh
authored andcommitted
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>
1 parent 3aa779a commit 287d298

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/openat2/openat2_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void test_openat2_flags(void)
300300

301301
ksft_print_msg("openat2 unexpectedly returned ");
302302
if (fdpath)
303-
ksft_print_msg("%d['%s'] with %X (!= %X)\n",
303+
ksft_print_msg("%d['%s'] with %X (!= %llX)\n",
304304
fd, fdpath, fdflags,
305305
test->how.flags);
306306
else

0 commit comments

Comments
 (0)