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

selftests/sigaltstack: Fix wrong format specifier

Compiling sigaltstack selftest after adding a __printf() attribute to
ksft_print_msg() exposes -Wformat warning in main().
The format specifier inside ksft_print_msg() expects a long
unsigned int but the passed variable is of unsigned int type.

Fix the format specifier so it matches the passed 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
a8cfb036 4d7f4e81

+1 -1
+1 -1
tools/testing/selftests/sigaltstack/sas.c
··· 111 111 112 112 /* Make sure more than the required minimum. */ 113 113 stack_size = getauxval(AT_MINSIGSTKSZ) + SIGSTKSZ; 114 - ksft_print_msg("[NOTE]\tthe stack size is %lu\n", stack_size); 114 + ksft_print_msg("[NOTE]\tthe stack size is %u\n", stack_size); 115 115 116 116 ksft_print_header(); 117 117 ksft_set_plan(3);