build: add -Wno-error=unused-result to target cflags
authorFelix Fietkau <[email protected]>
Mon, 23 Nov 2015 14:03:03 +0000 (14:03 +0000)
committerFelix Fietkau <[email protected]>
Mon, 23 Nov 2015 14:03:03 +0000 (14:03 +0000)
Many glibc functions have __warn_unused_result__ in so many different
core functions, and failing the build for all of those simply does not
make any sense

Signed-off-by: Felix Fietkau <[email protected]>
Backport of r47440

SVN-Revision: 47607

rules.mk

index e13d8ccc9fc5df35edec772a98897081f25bb17c..9d0134d2b26a52b74d30546cc3d51f7e71d1bc75 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -143,7 +143,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 $(if $(CONFIG_GCC_VERSION_4_4)$(CONFIG_GCC_VERSION_4_5),,-Wno-error=unused-but-set-variable)
+    TARGET_CFLAGS+= -fhonour-copts $(if $(CONFIG_GCC_VERSION_4_4)$(CONFIG_GCC_VERSION_4_5),,-Wno-error=unused-but-set-variable) -Wno-error=unused-result
     TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include -I$(TOOLCHAIN_DIR)/include
     TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib
     TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)