From e42ca8806aa35c4e00beb9a376eecd3c4aafb934 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 27 Oct 2009 04:44:53 -0400 Subject: [PATCH] Filter out warn_unused_result messages rather than play nice with gcc. Fixes issue #149. --- mk/gcc.mk | 1 - util/compile | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/mk/gcc.mk b/mk/gcc.mk index 13aad102..b37b59cf 100644 --- a/mk/gcc.mk +++ b/mk/gcc.mk @@ -19,7 +19,6 @@ CFLAGS += \ -Wno-parentheses \ -Wno-sign-compare \ -Wno-switch \ - -Wno-unused-result \ -Wpointer-arith \ -Wreturn-type \ -Wstrict-prototypes \ diff --git a/util/compile b/util/compile index 01580610..53f3f1da 100755 --- a/util/compile +++ b/util/compile @@ -59,7 +59,7 @@ undup() { # GCC is crap. } cat $xtmp | sed "s,^$re,$base&,g; s,\([[:space:]]\)$re,\1$base\2,g" | - egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:|support .long long.|use of C99 long long|ISO C forbids conversion' | + egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:|support .long long.|use of C99 long long|ISO C forbids conversion|warning:.*warn_unused_result' | sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' | awk '$1 == "warning:"{t=$2" "$1; sub(/^[^ ]+ [^ ]+ /, ""); $0 = t" "$0}; //' | awk '{sub(/\[/, ": [", $1); print}' |