]> git.itanic.dy.fi Git - linux-stable/commit
selftests: timers: Fix posix_timers ksft_print_msg() warning
authorJohn Stultz <jstultz@google.com>
Wed, 10 Apr 2024 23:26:28 +0000 (16:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 09:23:39 +0000 (11:23 +0200)
commit2ba19907b18d6bd7cb7466774cd799886521cd43
tree4b441eb5d0d20ed8506f9e0aa36670420966beb5
parent6cfbbdc56e891bca2ab72a5c7b52daea3b14d558
selftests: timers: Fix posix_timers ksft_print_msg() warning

commit e4a6bceac98eba3c00e874892736b34ea5fdaca3 upstream.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/timers/posix_timers.c