[PATCH 20/20] Make: Add -Wmissing-prototypes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-Wmissing-prototypes is a useful warning, so add it to the build.

With this we can detect conflicting function prototypes. When a file
implements a function but doesn't include the header file which
provides the prototype for it then conflicting prototypes would go
unnoticed without this warning.

MIPS already had that warning, so we can remove it from the MIPS
Makefile.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 Makefile           | 2 +-
 arch/mips/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index db474af502..203ae20e7e 100644
--- a/Makefile
+++ b/Makefile
@@ -307,7 +307,7 @@ CPPFLAGS        := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffre
 
 CFLAGS          := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                    -Werror-implicit-function-declaration \
-                   -fno-strict-aliasing -fno-common -Os -pipe
+                   -fno-strict-aliasing -fno-common -Os -pipe -Wmissing-prototypes
 AFLAGS          := -D__ASSEMBLY__
 
 LDFLAGS_barebox	:= -Map barebox.map
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 3342e0eafd..6338dc174d 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -12,7 +12,7 @@ endif
 CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants
 
 cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
-cflags-y += -Wall -Wmissing-prototypes -Wstrict-prototypes \
+cflags-y += -Wall -Wstrict-prototypes \
 	-Wno-uninitialized -Wno-format -Wno-main
 
 ifdef CONFIG_32BIT
-- 
2.19.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux