Skip to content

Commit e4a6bce

Browse files
johnstultz-workKAGA-KOKO
authored andcommitted
selftests: timers: Fix posix_timers ksft_print_msg() warning
After commit 6d029c2 ("selftests/timers/posix_timers: Reimplement check_timer_distribution()") the following warning occurs when building with an older gcc: posix_timers.c:250:2: warning: format not a string literal and no format arguments [-Wformat-security] 250 | ksft_print_msg(errmsg); | ^~~~~~~~~~~~~~ Fix this up by changing it to ksft_print_msg("%s", errmsg) Fixes: 6d029c2 ("selftests/timers/posix_timers: Reimplement check_timer_distribution()") Signed-off-by: John Stultz <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Justin Stitt <[email protected]> Acked-by: Shuah Khan <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent 0763613 commit e4a6bce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/timers/posix_timers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ static int check_timer_distribution(void)
247247
ksft_test_result_skip("check signal distribution (old kernel)\n");
248248
return 0;
249249
err:
250-
ksft_print_msg(errmsg);
250+
ksft_print_msg("%s", errmsg);
251251
return -1;
252252
}
253253

0 commit comments

Comments
 (0)