netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Cc: Alexei Starovoitov <ast@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH v2] bpf: silence warnings when building kernel/bpf/core.c with W=1
Date: Sun, 31 Jul 2016 21:42:22 -0700	[thread overview]
Message-ID: <20160801044220.GA97382@ast-mbp.thefacebook.com> (raw)
In-Reply-To: <23710.1470026010@turing-police.cc.vt.edu>

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@vt.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?

  reply	other threads:[~2016-08-01  4:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01  4:33 [PATCH v2] bpf: silence warnings when building kernel/bpf/core.c with W=1 Valdis Kletnieks
2016-08-01  4:42 ` Alexei Starovoitov [this message]
2016-08-01  5:18   ` Valdis.Kletnieks
2016-08-01 15:09     ` Alexei Starovoitov

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=20160801044220.GA97382@ast-mbp.thefacebook.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=ast@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).