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)
Unified · Split
| @@ -247,7 +247,7 @@ static int check_timer_distribution(void) · 246 unmodified lines | |||
| 247 | ksft_test_result_skip("check signal distribution (old kernel)\n"); | 247 | ksft_test_result_skip("check signal distribution (old kernel)\n"); |
| 248 | return 0; | 248 | return 0; |
| 249 | err: | 249 | err: |
| 250 | ksft_print_msg(errmsg); | 250 | ksft_print_msg("%s", errmsg); |
| 251 | return -1; | 251 | return -1; |
| 252 | } | 252 | } |
| 253 | 253 | ||