summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorValdis Klētnieks <valdis.kletnieks@vt.edu>2019-06-06 22:39:27 -0400
committerDaniel Borkmann <daniel@iogearbox.net>2019-06-12 16:51:02 +0200
commitaee450cbe482a8c2f6fa5b05b178ef8b8ff107ca (patch)
tree35674eb15f6f11711984a66dd13d4ab779320b5b /samples
parent5e2ac390fbd08b2a462db66cef2663e4db0d5191 (diff)
downloadlinux-stable-aee450cbe482a8c2f6fa5b05b178ef8b8ff107ca.tar.gz
linux-stable-aee450cbe482a8c2f6fa5b05b178ef8b8ff107ca.tar.bz2
linux-stable-aee450cbe482a8c2f6fa5b05b178ef8b8ff107ca.zip
bpf: silence warning messages in core
Compiling kernel/bpf/core.c with W=1 causes a flood of warnings: kernel/bpf/core.c:1198:65: warning: initialized field overwritten [-Woverride-init] 1198 | #define BPF_INSN_3_TBL(x, y, z) [BPF_##x | BPF_##y | BPF_##z] = true | ^~~~ kernel/bpf/core.c:1087:2: note: in expansion of macro 'BPF_INSN_3_TBL' 1087 | INSN_3(ALU, ADD, X), \ | ^~~~~~ kernel/bpf/core.c:1202:3: note: in expansion of macro 'BPF_INSN_MAP' 1202 | BPF_INSN_MAP(BPF_INSN_2_TBL, BPF_INSN_3_TBL), | ^~~~~~~~~~~~ kernel/bpf/core.c:1198:65: note: (near initialization for 'public_insntable[12]') 1198 | #define BPF_INSN_3_TBL(x, y, z) [BPF_##x | BPF_##y | BPF_##z] = true | ^~~~ kernel/bpf/core.c:1087:2: note: in expansion of macro 'BPF_INSN_3_TBL' 1087 | INSN_3(ALU, ADD, X), \ | ^~~~~~ kernel/bpf/core.c:1202:3: note: in expansion of macro 'BPF_INSN_MAP' 1202 | BPF_INSN_MAP(BPF_INSN_2_TBL, BPF_INSN_3_TBL), | ^~~~~~~~~~~~ 98 copies of the above. The attached patch silences the warnings, because we *know* we're overwriting the default initializer. That leaves bpf/core.c with only 6 other warnings, which become more visible in comparison. Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Acked-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions