summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohn Stultz <jstultz@google.com>2024-04-10 16:26:28 -0700
committerThomas Gleixner <tglx@linutronix.de>2024-04-12 14:11:15 +0200
commite4a6bceac98eba3c00e874892736b34ea5fdaca3 (patch)
tree90a1055baf05f1ae0fdc11b05604171a378891cb /tools
parent076361362122a6d8a4c45f172ced5576b2d4a50d (diff)
selftests: timers: Fix posix_timers ksft_print_msg() warning
After commit 6d029c25b71f ("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: 6d029c25b71f ("selftests/timers/posix_timers: Reimplement check_timer_distribution()") Signed-off-by: John Stultz <jstultz@google.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Justin Stitt <justinstitt@google.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240410232637.4135564-1-jstultz@google.com
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/timers/posix_timers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c
index d86a0e00711e..348f47176e0a 100644
--- a/tools/testing/selftests/timers/posix_timers.c
+++ b/tools/testing/selftests/timers/posix_timers.c
@@ -247,7 +247,7 @@ static int check_timer_distribution(void)
ksft_test_result_skip("check signal distribution (old kernel)\n");
return 0;
err:
- ksft_print_msg(errmsg);
+ ksft_print_msg("%s", errmsg);
return -1;
}