add -Werror-implicit-function-declaration to CFLAGS
Subsystems (2)
PATCH 1/1 add -Werror-implicit-function-declaration to CFLAGS
Currently, using an undeclared function gives a compile warning, but it can lead to a nasty to debug runtime stack corruptions if the prototype of the function is different from what gcc guessed.
With -Werror-implicit-function-declaration we are getting an immediate compile error instead.
Signed-off-by Adrian Bunk <[email protected]>
---
Makefile | 3 ++- drivers/input/joystick/iforce/Makefile | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-)
Makefile renamed from Makefile.old +2 -1
@@ -317,7 +317,8 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common + -fno-strict-aliasing -fno-common \ + -Werror-implicit-function-declaration AFLAGS := -D__ASSEMBLY__ # Read KERNELRELEASE from include/config/kernel.release (if it exists)
drivers/input/joystick/iforce/Makefile renamed from drivers/input/joystick/iforce/Makefile.old +0 -2
@@ -16,5 +16,3 @@ ifeq ($(CONFIG_JOYSTICK_IFORCE_USB),y) iforce-objs += iforce-usb.o endif - -EXTRA_CFLAGS = -Werror-implicit-function-declaration