lkml.org 
[lkml]   [2019]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] selftests/bpf: Fix compile warning in bpf selftest
This fixes the following compile time warning

flow_dissector_load.c: In function ‘detach_program’:
flow_dissector_load.c:55:19: warning: format not a string literal and no format arguments [-Wformat-security]
error(1, errno, command);
^~~~~~~
Signed-off-by: Alakesh Haloi <alakesh.haloi@gmail.com>
---
tools/testing/selftests/bpf/flow_dissector_load.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/flow_dissector_load.c b/tools/testing/selftests/bpf/flow_dissector_load.c
index 77cafa66d048..7136ab9ffa73 100644
--- a/tools/testing/selftests/bpf/flow_dissector_load.c
+++ b/tools/testing/selftests/bpf/flow_dissector_load.c
@@ -52,7 +52,7 @@ static void detach_program(void)
sprintf(command, "rm -r %s", cfg_pin_path);
ret = system(command);
if (ret)
- error(1, errno, command);
+ error(1, errno, "%s", command);
}

static void parse_opts(int argc, char **argv)
--
2.17.1
\
 
 \ /
  Last update: 2019-05-08 01:13    [W:0.058 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site