Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 04e1f99

Browse files
Amer-shanawanyshuahkh
authored andcommitted
selftests: seccomp: fix format-zero-length warnings
fix the following errors by using string format specifier and an empty parameter: seccomp_benchmark.c:197:24: warning: zero-length gnu_printf format string [-Wformat-zero-length] 197 | ksft_print_msg(""); | ^~ seccomp_benchmark.c:202:24: warning: zero-length gnu_printf format string [-Wformat-zero-length] 202 | ksft_print_msg(""); | ^~ seccomp_benchmark.c:204:24: warning: zero-length gnu_printf format string [-Wformat-zero-length] 204 | ksft_print_msg(""); | ^~ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202312260235.Uj5ug8K9-lkp@intel.com/ Suggested-by: Kees Cook <kees@kernel.org> Signed-off-by: Amer Al Shanawany <amer.shanawany@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent 2049aad commit 04e1f99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/testing/selftests/seccomp/seccomp_benchmark.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,14 @@ int main(int argc, char *argv[])
194194
ksft_set_plan(7);
195195

196196
ksft_print_msg("Running on:\n");
197-
ksft_print_msg("");
197+
ksft_print_msg("%s", "");
198198
system("uname -a");
199199

200200
ksft_print_msg("Current BPF sysctl settings:\n");
201201
/* Avoid using "sysctl" which may not be installed. */
202-
ksft_print_msg("");
202+
ksft_print_msg("%s", "");
203203
system("grep -H . /proc/sys/net/core/bpf_jit_enable");
204-
ksft_print_msg("");
204+
ksft_print_msg("%s", "");
205205
system("grep -H . /proc/sys/net/core/bpf_jit_harden");
206206

207207
affinity();

0 commit comments

Comments
 (0)