Commit e4a6bcea authored by John Stultz's avatar John Stultz Committed by Thomas Gleixner

selftests: timers: Fix posix_timers ksft_print_msg() warning

After commit 6d029c25 ("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: 6d029c25 ("selftests/timers/posix_timers: Reimplement check_timer_distribution()")
Signed-off-by: default avatarJohn Stultz <jstultz@google.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarJustin Stitt <justinstitt@google.com>
Acked-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240410232637.4135564-1-jstultz@google.com
parent 07636136
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment