diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-03-24 13:22:46 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-03-25 13:46:09 +0100 |
commit | 518e7f902072858939c4fd0150c419a94adc7a87 (patch) | |
tree | 3e9c7f6942784d787cbe0a68fcac5dacf8445610 /Makefile | |
parent | 45384434d8e597fce628d240ad810813474c50a0 (diff) | |
download | barebox-518e7f902072858939c4fd0150c419a94adc7a87.tar.gz barebox-518e7f902072858939c4fd0150c419a94adc7a87.tar.xz |
kbuild: add -Wtype-limits to compile flags
Not warning about e.g. comparisons of unsigned integers with 0 can
introduce nasty bugs around error handling especially.
Enable the warning to be able to identify these issues in future.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -650,6 +650,9 @@ CHECKFLAGS += $(NOSTDINC_FLAGS) # warn about C99 declaration after statement KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) +# warn about e.g. (unsigned)x < 0 +KBUILD_CFLAGS += $(call cc-option,-Wtype-limits) + # disable pointer signed / unsigned warnings in gcc 4.0 KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) |