summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/cgroup.c
diff options
context:
space:
mode:
authorQuentin Monnet <quentin.monnet@netronome.com>2019-08-14 14:37:24 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2019-08-14 23:57:36 +0300
commita9436dca115d121d98e0b30f078f3294ce13fa18 (patch)
tree0d9cbcb6238cc5c3c359ff39209eb616b122612f /tools/bpf/bpftool/cgroup.c
parentc162610c7db2e9611a7b3ec806f9c97fcfec0b0b (diff)
downloadlinux-a9436dca115d121d98e0b30f078f3294ce13fa18.tar.xz
tools: bpftool: compile with $(EXTRA_WARNINGS)
Compile bpftool with $(EXTRA_WARNINGS), as defined in scripts/Makefile.include, and fix the new warnings produced. Simply leave -Wswitch-enum out of the warning list, as we have several switch-case structures where it is not desirable to process all values of an enum. Remove -Wshadow from the warnings we manually add to CFLAGS, as it is handled in $(EXTRA_WARNINGS). Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/cgroup.c')
-rw-r--r--tools/bpf/bpftool/cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/cgroup.c b/tools/bpf/bpftool/cgroup.c
index 44352b5aca85..1ef45e55039e 100644
--- a/tools/bpf/bpftool/cgroup.c
+++ b/tools/bpf/bpftool/cgroup.c
@@ -120,8 +120,8 @@ static int count_attached_bpf_progs(int cgroup_fd, enum bpf_attach_type type)
static int show_attached_bpf_progs(int cgroup_fd, enum bpf_attach_type type,
int level)
{
+ const char *attach_flags_str;
__u32 prog_ids[1024] = {0};
- char *attach_flags_str;
__u32 prog_cnt, iter;
__u32 attach_flags;
char buf[32];