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
..
2018-08-13 00:52:45 +02:00
2017-04-17 13:55:52 -04:00
2017-09-01 09:57:39 -07:00
2018-09-12 22:00:23 +02:00
2018-08-07 14:29:55 +02:00
2019-07-10 09:53:47 +02:00
2018-08-17 15:56:23 -07:00
2019-07-14 08:11:11 +02:00
2018-03-23 17:38:57 +01:00
2018-03-23 17:38:57 +01:00
2019-05-25 18:23:48 +02:00
2018-08-03 00:47:32 +02:00
2019-05-25 18:23:47 +02:00
2018-12-17 09:24:33 +01:00
2019-07-03 13:14:48 +02:00
2019-07-26 09:14:06 +02:00
2019-01-31 08:14:41 +01:00
2017-06-29 13:13:25 -04:00
2018-07-18 15:10:34 +02:00
2019-03-13 14:02:36 -07:00
2019-03-13 14:02:36 -07:00
2018-08-11 01:58:46 +02:00
2018-09-22 02:46:41 +02:00
2019-03-23 20:09:48 +01:00
2019-07-03 13:14:48 +02:00
2018-04-29 08:45:53 -07:00
2019-07-03 13:14:48 +02:00
2018-10-11 10:19:01 +02:00