diff options
author | Quentin Monnet <quentin.monnet@netronome.com> | 2019-08-14 13:37:24 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-08-14 22:57:36 +0200 |
commit | a9436dca115d121d98e0b30f078f3294ce13fa18 (patch) | |
tree | 0d9cbcb6238cc5c3c359ff39209eb616b122612f /tools/bpf/bpftool/perf.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next (diff) | |
download | linux-a9436dca115d121d98e0b30f078f3294ce13fa18.tar.xz linux-a9436dca115d121d98e0b30f078f3294ce13fa18.zip |
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/perf.c')
-rw-r--r-- | tools/bpf/bpftool/perf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/perf.c b/tools/bpf/bpftool/perf.c index f2a545e667c4..b2046f33e23f 100644 --- a/tools/bpf/bpftool/perf.c +++ b/tools/bpf/bpftool/perf.c @@ -104,6 +104,8 @@ static void print_perf_json(int pid, int fd, __u32 prog_id, __u32 fd_type, jsonw_string_field(json_wtr, "filename", buf); jsonw_lluint_field(json_wtr, "offset", probe_offset); break; + default: + break; } jsonw_end_object(json_wtr); } @@ -140,6 +142,8 @@ static void print_perf_plain(int pid, int fd, __u32 prog_id, __u32 fd_type, printf("uretprobe filename %s offset %llu\n", buf, probe_offset); break; + default: + break; } } |