build: add -Wno-error=unused-result to target cflags
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 10 Nov 2015 12:04:09 +0000 (12:04 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 10 Nov 2015 12:04:09 +0000 (12:04 +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 <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47440 3c298f89-4303-0410-b956-a3cf2f4a3e73

rules.mk

index 348b45d..f749863 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 -Wno-error=unused-but-set-variable
+    TARGET_CFLAGS+= -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result
     TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include
     ifeq ($(CONFIG_USE_MUSL),y)
       TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/include/fortify