History

selftests: timers: Fix posix_timers ksft_print_msg() warning

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)

John Stultz committed 2 years ago

Commit e4a6bce1 parent 07636131 file · +1 −1Browse files

Unified · Split

tools/testing/selftests/timers/posix_timers.c+1−1
@@ -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;
249err:249err:
250 ksft_print_msg(errmsg);250 ksft_print_msg("%s", errmsg);
251 return -1;251 return -1;
252}252}
253 253

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t