From: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
To: Alexei Starovoitov <ast@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] bpf: silence warnings when building kernel/bpf/core.c with W=1
Date: Mon, 01 Aug 2016 00:33:30 -0400 [thread overview]
Message-ID: <23710.1470026010@turing-police.cc.vt.edu> (raw)
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
obj-y := core.o
obj-$(CONFIG_BPF_SYSCALL) += syscall.o verifier.o inode.o helpers.o
next reply other threads:[~2016-08-01 4:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-01 4:33 Valdis Kletnieks [this message]
2016-08-01 4:42 ` [PATCH v2] bpf: silence warnings when building kernel/bpf/core.c with W=1 Alexei Starovoitov
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=23710.1470026010@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=ast@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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).