Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Maciej Wieczor-Retman and committed by
Shuah Khan
287d2982 3aa779a9

+1 -1
+1 -1
tools/testing/selftests/openat2/openat2_test.c
··· 300 300 301 301 ksft_print_msg("openat2 unexpectedly returned "); 302 302 if (fdpath) 303 - ksft_print_msg("%d['%s'] with %X (!= %X)\n", 303 + ksft_print_msg("%d['%s'] with %X (!= %llX)\n", 304 304 fd, fdpath, fdflags, 305 305 test->how.flags); 306 306 else