[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160801044220.GA97382@ast-mbp.thefacebook.com>
Date: Sun, 31 Jul 2016 21:42:22 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Valdis Kletnieks <Valdis.Kletnieks@...edu>
Cc: Alexei Starovoitov <ast@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH v2] bpf: silence warnings when building kernel/bpf/core.c
with W=1
On Mon, Aug 01, 2016 at 12:33:30AM -0400, Valdis Kletnieks wrote:
> Building with W=1 generates some 350 lines of warnings of the form:
>
> kernel/bpf/core.c: In function '__bpf_prog_run':
> kernel/bpf/core.c:476:33: warning: initialized field overwritten [-Woverride-init]
> [BPF_ALU | BPF_ADD | BPF_X] = &&ALU_ADD_X,
> ^~
> kernel/bpf/core.c:476:33: note: (near initialization for 'jumptable[12]')
>
> Since they come from the way we intentionally build the table, silence
> that one specific warning.
>
> Signed-off-by: Valdis Kletnieks <valdis.kletnieks@...edu>
>
> Version 2: Add bpf: subsystem tag to subject line
>
> diff --git a/kernel/bpf/Makefile b/kernel/bpf/Makefile
> index eed911d091da..bb915f9d9f92 100644
> --- a/kernel/bpf/Makefile
> +++ b/kernel/bpf/Makefile
> @@ -1,3 +1,4 @@
> +CFLAGS_core.o += -Wno-override-init
and at least 2 other such patches for other files...
Is there a single warning where -Woverride-init was useful?
May be worth disabling this warning for the whole build?
Powered by blists - more mailing lists