From 5b5db336e93622dc4c54e02a42a39d1b3b1a9fbd Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Tue, 7 Jun 2016 13:39:43 +0200 Subject: build: silence -Wunused-result For clang, it's enough to just put (void) around usages we are intentionally ignoring the result of. Since GCC does not seem to want to respect this decision, we are forced to disable the warning globally. --- waftools/detections/compiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'waftools/detections') diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py index ada20796b1..5c4b680343 100644 --- a/waftools/detections/compiler.py +++ b/waftools/detections/compiler.py @@ -41,7 +41,9 @@ def __add_generic_flags__(ctx): def __add_gcc_flags__(ctx): ctx.env.CFLAGS += ["-Wall", "-Wundef", "-Wmissing-prototypes", "-Wshadow", "-Wno-switch", "-Wparentheses", "-Wpointer-arith", - "-Wno-pointer-sign"] + "-Wno-pointer-sign", + # GCC bug 66425 + "-Wno-unused-result"] def __add_clang_flags__(ctx): ctx.env.CFLAGS += ["-Wno-logical-op-parentheses", "-fcolor-diagnostics", -- cgit v1.2.3