From: Daniel Borkmann <daniel@iogearbox.net>
To: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>,
"Alexei Starovoitov" <ast@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH] bpf/core.c - silence warning messages
Date: Wed, 12 Jun 2019 16:56:13 +0200 [thread overview]
Message-ID: <d693c3bd-7491-588e-3648-59bbef3b88fa@iogearbox.net> (raw)
In-Reply-To: <29466.1559875167@turing-police>
On 06/07/2019 04:39 AM, Valdis Klētnieks wrote:
> 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>
Makes sense, applied!
next prev parent reply other threads:[~2019-06-12 14:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 2:39 [PATCH] bpf/core.c - silence warning messages Valdis Klētnieks
2019-06-11 5:46 ` Andrii Nakryiko
2019-06-12 14:56 ` Daniel Borkmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-01-28 4:11 valdis.kletnieks
2019-01-28 17:18 ` Song Liu
2019-01-28 23:22 ` Daniel Borkmann
2019-01-28 23:48 ` valdis.kletnieks
2019-01-28 23:54 ` Daniel Borkmann
2019-01-28 23:35 ` valdis.kletnieks
2019-01-29 3:12 ` Song Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d693c3bd-7491-588e-3648-59bbef3b88fa@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=valdis.kletnieks@vt.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox