* [PATCH] Suppress warnings when compiling fs/proc/task_mmu.c with W=1
@ 2016-08-01 3:28 Valdis Kletnieks
0 siblings, 0 replies; only message in thread
From: Valdis Kletnieks @ 2016-08-01 3:28 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Suppress a bunch of warnings of the form:
fs/proc/task_mmu.c: In function 'show_smap_vma_flags':
fs/proc/task_mmu.c:635:22: warning: initialized field overwritten [-Wt override-init]
[ilog2(VM_READ)] = "rd",
^~~~
fs/proc/task_mmu.c:635:22: note: (near initialization for 'mnemonics[0]')
They happen because of the way we intentionally build the table, so
silence the warning when building with 'make W=1'.
Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index 7151ea428041..a8c13605b434 100644
--- a/fs/proc/Makefile
+++ b/fs/proc/Makefile
@@ -4,6 +4,7 @@
obj-y += proc.o
+CFLAGS_task_mmu.o += -Wno-override-init
proc-y := nommu.o task_nommu.o
proc-$(CONFIG_MMU) := task_mmu.o
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-01 3:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-01 3:28 [PATCH] Suppress warnings when compiling fs/proc/task_mmu.c with W=1 Valdis Kletnieks
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).