Re: [PATCH] bpf/core.c - silence warning messages
From: Song Liu
Date: Mon Jan 28 2019 - 22:13:03 EST
On Mon, Jan 28, 2019 at 3:35 PM <valdis.kletnieks@xxxxxx> wrote:
> On Mon, 28 Jan 2019 09:18:45 -0800, Song Liu said:
> > On Sun, Jan 27, 2019 at 8:43 PM <valdis.kletnieks@xxxxxx> wrote:
> > > 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.
> > My concern is that this will also mute the warning for other parts of
> > bpf/core.c.
> I checked and there weren't any warnings for other parts of the file. Also, this message
> doesn't even happen unless you build with W=1, which apparently happens so rarely
> that nobody else has submitted a patch.
> Is there a high likelihood that another overwrite of an initializer is going to
> be included in the source?
> > Maybe we should move bpf_opcode_in_insntable() to a separate file, and mute
> > warning for that file?
> Seems to be overkill - the intent of this patch was mostly to make the *other*
> warnings issued with W=1 more noticable.
Yeah, I also felt this might be overkill while asking initially.
Acked-by: Song Liu <songliubraving@xxxxxx>