Valdis Klētnieks
07df68f0b8
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-31 07:28:25 +02:00
..
2019-07-31 07:28:25 +02:00
2019-07-10 09:54:35 +02:00
2019-02-12 19:46:09 +01:00
2019-07-21 09:04:38 +02:00
2019-05-10 17:53:13 +02:00
2019-07-10 09:54:37 +02:00
2019-07-31 07:28:23 +02:00
2019-06-11 12:21:48 +02:00
2018-12-17 09:28:55 +01:00
2019-05-31 06:47:33 -07:00
2019-05-31 06:47:26 -07:00
2019-06-15 11:54:53 +02:00
2019-07-10 09:54:41 +02:00
2018-09-26 08:38:09 +02:00
2019-05-31 06:47:25 -07:00
2018-08-06 16:20:49 +02:00
2018-11-13 11:15:08 -08:00
2019-07-21 09:04:40 +02:00
2019-06-19 08:20:55 +02:00
2018-08-03 07:50:38 +02:00
2019-04-05 22:31:37 +02:00
2019-05-21 18:50:17 +02:00
2019-05-10 17:53:15 +02:00
2019-04-20 09:15:05 +02:00
2018-12-05 19:41:17 +01:00
2018-08-03 07:50:22 +02:00
2019-04-27 09:35:38 +02:00
2018-08-03 07:50:21 +02:00
2019-06-19 08:20:56 +02:00
2019-01-13 10:01:02 +01:00
2019-02-12 19:46:02 +01:00
2018-12-29 13:39:10 +01:00
2019-07-31 07:28:21 +02:00
2019-07-10 09:54:38 +02:00
2019-03-13 14:03:20 -07:00
2019-06-09 09:18:17 +02:00
2019-02-12 19:46:13 +01:00
2018-08-15 18:12:47 +02:00
2018-09-05 09:26:36 +02:00
2019-06-15 11:54:52 +02:00
2019-06-15 11:54:51 +02:00
2018-09-09 19:56:00 +02:00
2018-09-09 19:56:00 +02:00
2018-09-05 09:26:42 +02:00
2018-09-05 09:26:42 +02:00
2018-09-05 09:26:42 +02:00