[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/5] configure: disable a few Clang compiler war

From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH 5/5] configure: disable a few Clang compiler warnings
Date: Mon, 30 Jul 2012 18:56:14 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

Am 30.07.2012 18:04, schrieb address@hidden:
From: Blue Swirl <address@hidden>

Clang compiler warns about a few constructs in QEMU code. It's possible
to avoid those but that needs more work.

Suppress some warnings for Clang compiler. -Wno-unused-value would
conflict with GCC.

Signed-off-by: Blue Swirl <address@hidden>
  configure |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index c65b5f6..e32f188 100755
--- a/configure
+++ b/configure
@@ -1154,17 +1154,20 @@ if test -z "$werror" ; then
+# GCC flags
  gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
  gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers 
  gcc_flags="-Wmissing-include-dirs -Wempty-body -Wnested-externs $gcc_flags"
  gcc_flags="-fstack-protector-all -Wendif-labels $gcc_flags"
+# Clang flags
+clang_flags="-Wno-initializer-overrides -Wno-self-assign 

I'd prefer getting these warnings (and not having them disabled)
for compilations without -Werror ("$werror" = "no").


Stefan W.

  if test "$werror" = "yes" ; then
      gcc_flags="-Werror $gcc_flags"
  cat > $TMPC << EOF
  int main(void) { return 0; }
-for flag in $gcc_flags; do
+for flag in $gcc_flags $clang_flags; do
      if compile_prog "-Werror $flag" "" ; then
        QEMU_CFLAGS="$QEMU_CFLAGS $flag"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]