selftests/sigaltstack: Fix wrong format specifier
authorMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Fri, 13 Oct 2023 11:36:29 +0000 (13:36 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 13 Oct 2023 20:08:26 +0000 (14:08 -0600)
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>
tools/testing/selftests/sigaltstack/sas.c

index 98d37cb744fb28f628e628bcfb27bb24a714ac87..07227fab1cc9856e5ec0e72c604be5c03620fc2a 100644 (file)
@@ -111,7 +111,7 @@ int main(void)
 
        /* Make sure more than the required minimum. */
        stack_size = getauxval(AT_MINSIGSTKSZ) + SIGSTKSZ;
-       ksft_print_msg("[NOTE]\tthe stack size is %lu\n", stack_size);
+       ksft_print_msg("[NOTE]\tthe stack size is %u\n", stack_size);
 
        ksft_print_header();
        ksft_set_plan(3);