[Xfce4-commits] <midori:master> wscript: Only append `-Wno-unused-but-set-variable` to `CCFLAGS` for GCC
Christian Dywan
noreply at xfce.org
Thu Jan 10 23:50:01 CET 2013
Updating branch refs/heads/master
to 626407f20bc46562d2dd1abb16abaa18c9f29c9d (commit)
from 01124b1f1076f4f96ff46dfb4cd5b7168659e0c0 (commit)
commit 626407f20bc46562d2dd1abb16abaa18c9f29c9d
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date: Wed Jan 9 11:23:45 2013 +0100
wscript: Only append `-Wno-unused-but-set-variable` to `CCFLAGS` for GCC
Clang does not know about that that switch [1] and reports a warning.
$ CC=clang ./waf configure
$ ./waf build
[…]
clang: warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-variable'?
warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-variable'? [-Wunknown-warning-option]
[…]
Addresses: https://bugs.launchpad.net/midori/+bug/1097670
[1] http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
[2] http://gcc.gnu.org/gcc-4.6/porting_to.html
wscript | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/wscript b/wscript
index 318a7a3..1659dcb 100644
--- a/wscript
+++ b/wscript
@@ -370,7 +370,9 @@ def configure (conf):
'-Winline -Wformat-security -fno-common '
'-Winit-self -Wundef -Wdeclaration-after-statement '
'-Wmissing-format-attribute -Wnested-externs'.split ())
- conf.env.append_value ('CCFLAGS', '-Wno-unused-but-set-variable -Wno-unused-variable -Wno-comment'.split ())
+ conf.env.append_value ('CCFLAGS', '-Wno-unused-variable -Wno-comment'.split ())
+ if compiler == 'gcc':
+ conf.env.append_value ('CCFLAGS', '-Wno-unused-but-set-variable'.split ())
if conf.env['UNIQUE_VERSION'] == '1.0.4':
Utils.pprint ('RED', 'unique 1.0.4 found, this version is erroneous.')
More information about the Xfce4-commits
mailing list