diff options
author | John Stultz <jstultz@google.com> | 2024-04-11 02:26:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-27 18:11:30 +0300 |
commit | fe09b8d26e1a54da6cea72fa94d6fc8e3763e894 (patch) | |
tree | 0fd6c4216df1351683284eb0c47a7c25bbd2f570 /tools | |
parent | dbfb5232bd835a675f209b1cd3b91143dfc57610 (diff) | |
download | linux-fe09b8d26e1a54da6cea72fa94d6fc8e3763e894.tar.xz |
selftests: timers: Fix posix_timers ksft_print_msg() warning
[ Upstream commit e4a6bceac98eba3c00e874892736b34ea5fdaca3 ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/timers/posix_timers.c | 2 |
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 14355d847211..c001dd79179d 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; } |