Valdis Klētnieks
7c10f8941b
bpf: silence warning messages in core
[ Upstream commit aee450cbe4 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-26 09:14:06 +02:00
..
2019-07-26 09:14:06 +02:00
2019-07-10 09:53:39 +02:00
2019-02-12 19:47:19 +01:00
2019-07-21 09:03:05 +02:00
2019-07-21 09:03:13 +02:00
2019-07-10 09:53:40 +02:00
2019-07-26 09:14:03 +02:00
2019-06-11 12:20:52 +02:00
2019-05-31 06:46:30 -07:00
2019-06-04 08:02:34 +02:00
2019-06-19 08:18:06 +02:00
2019-07-10 09:53:44 +02:00
2019-05-31 06:46:05 -07:00
2019-05-31 06:46:17 -07:00
2019-07-21 09:03:11 +02:00
2019-06-19 08:18:00 +02:00
2019-04-05 22:33:13 +02:00
2019-05-22 07:37:41 +02:00
2019-05-10 17:54:11 +02:00
2019-04-20 09:16:02 +02:00
2019-05-31 06:46:19 -07:00
2019-06-04 08:02:34 +02:00
2019-02-12 19:47:20 +01:00
2019-04-27 09:36:37 +02:00
2019-06-19 08:18:01 +02:00
2019-06-04 08:02:34 +02:00
2019-07-26 09:14:01 +02:00
2019-07-10 09:53:41 +02:00
2019-03-13 14:02:35 -07:00
2019-06-09 09:17:20 +02:00
2019-02-12 19:47:25 +01:00
2019-06-15 11:54:01 +02:00
2019-06-15 11:53:59 +02:00
2019-04-03 06:26:29 +02:00
2019-05-02 09:58:56 +02:00