Skip to content

Commit

Permalink
fs/proc/task_mmu.c: suppress compilation warnings with W=1
Browse files Browse the repository at this point in the history
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'.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Valdis Kletnieks <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
valdisk authored and torvalds committed Aug 2, 2016
1 parent 519ded5 commit ca52953
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/proc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ca52953

Please sign in to comment.