summaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-07-17 13:26:14 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2022-12-26 12:59:18 +0100
commit5db4fbad4f55acf1a1bcc8b9685e2581789226a5 (patch)
tree1b0fcefd35f2e41a18669fa63cc2085420f22907 /rules.mk
parentab31547df06430798e6adb853a7faab13eb1754c (diff)
downloadopenwrt-5db4fbad4f55acf1a1bcc8b9685e2581789226a5.tar.gz
openwrt-5db4fbad4f55acf1a1bcc8b9685e2581789226a5.tar.bz2
openwrt-5db4fbad4f55acf1a1bcc8b9685e2581789226a5.zip
rules: drop -Wno-error additional flags from default TARGET_CFLAGS
We currently enable -Wno-error=unused-but-set-variable and -Wno-error=unused-result by default on every compile package. While this is (relatively) unharmful, we should follow other project direction and starts enforcing good code quality. For example the linux kernel recently started to enforce Wall by default and clean code is mandatory for inclusion. Drop for good these flags and and make it mandatory to correctly handle return values at least with a warning log if they are not strictly error condition. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.mk b/rules.mk
index e17852e021..d53f673d42 100644
--- a/rules.mk
+++ b/rules.mk
@@ -184,7 +184,7 @@ ifndef DUMP
-include $(TOOLCHAIN_DIR)/info.mk
export GCC_HONOUR_COPTS:=0
TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-)
- TARGET_CFLAGS+= -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result
+ TARGET_CFLAGS+= -fhonour-copts
TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include
ifeq ($(CONFIG_USE_MUSL),y)
TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/include/fortify