public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] selftests: timers: Fix posix_timers ksft_print_msg warning
@ 2024-04-10 23:26 John Stultz
  2024-04-10 23:26 ` [PATCH 2/3] selftests: timers: Fix uninitialized variable warning in ksft_min_kernel_version John Stultz
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: John Stultz @ 2024-04-10 23:26 UTC (permalink / raw)
  To: LKML
  Cc: John Stultz, Shuah Khan, Anna-Maria Behnsen, Frederic Weisbecker,
	Thomas Gleixner, Stephen Boyd, Nathan Chancellor,
	Nick Desaulniers, Bill Wendling, Justin Stitt, Oleg Nesterov,
	Andrew Morton, Edward Liaw, Carlos Llamas, kernel-team,
	linux-kselftest

After commit 6d029c25b71f ("selftests/timers/posix_timers:
Reimplement check_timer_distribution()") I started seeing the
following warning 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)

Cc: Shuah Khan <shuah@kernel.org>
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Edward Liaw <edliaw@google.com>
Cc: Carlos Llamas <cmllamas@google.com>
Cc: kernel-team@android.com
Cc: linux-kselftest@vger.kernel.org
Fixes: 6d029c25b71f ("selftests/timers/posix_timers: Reimplement check_timer_distribution()")
Signed-off-by: John Stultz <jstultz@google.com>
---
 tools/testing/selftests/timers/posix_timers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 }
 
-- 
2.44.0.478.gd926399ef9-goog


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-12 12:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10 23:26 [PATCH 1/3] selftests: timers: Fix posix_timers ksft_print_msg warning John Stultz
2024-04-10 23:26 ` [PATCH 2/3] selftests: timers: Fix uninitialized variable warning in ksft_min_kernel_version John Stultz
2024-04-11 15:39   ` Nathan Chancellor
2024-04-11 18:11     ` John Stultz
2024-04-11 18:47       ` Nathan Chancellor
2024-04-10 23:26 ` [PATCH 3/3] selftests: timers: Fix abs() warning in posix_timers test John Stultz
2024-04-12 12:15   ` [tip: timers/urgent] " tip-bot2 for John Stultz
2024-04-10 23:28 ` [PATCH 1/3] selftests: timers: Fix posix_timers ksft_print_msg warning Justin Stitt
2024-04-11  9:38 ` Oleg Nesterov
2024-04-11 20:45 ` Shuah Khan
2024-04-11 20:53   ` John Stultz
2024-04-11 21:12     ` Shuah Khan
2024-04-12 12:15 ` [tip: timers/urgent] selftests: timers: Fix posix_timers ksft_print_msg() warning tip-bot2 for John Stultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox