]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
Fix warnings suppressors to honor --disable-werror
authorMarkus Armbruster <armbru@redhat.com>
Tue, 16 Apr 2013 11:51:06 +0000 (13:51 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 17 Apr 2013 15:28:04 +0000 (10:28 -0500)
Replace

    #pragma GCC diagnostic ignored FOO
    [Troublesome code...]
    #pragma GCC diagnostic error FOO

by

    #pragma GCC diagnostic push
    #pragma GCC diagnostic ignored FOO
    [Troublesome code...]
    #pragma GCC diagnostic pop

Broken in commit 3f4349d, commit 092bb30, and commit c95e308.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1366113066-1340-1-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure
coroutine-ucontext.c
include/ui/qemu-pixman.h
ui/gtk.c

index 0fb9a9394e188ab4649c0a229cc9f9c6fdfac0c0..de9334561cb4cd2576cc143e3b825ff455dc6e64 100755 (executable)
--- a/configure
+++ b/configure
@@ -3268,8 +3268,10 @@ fi
 
 pragma_disable_unused_but_set=no
 cat > $TMPC << EOF
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
 #pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#pragma GCC diagnostic pop
 
 int main(void) {
     return 0;
index 867a662de0b1c35b2779f70ae43527d5f13ae878..4bf2cde279b9ccab0d4b5e8b7b18948402a39749 100644 (file)
@@ -169,6 +169,7 @@ Coroutine *qemu_coroutine_new(void)
 #ifdef CONFIG_VALGRIND_H
 #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
 /* Work around an unused variable in the valgrind.h macro... */
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
 #endif
 static inline void valgrind_stack_deregister(CoroutineUContext *co)
@@ -176,7 +177,7 @@ static inline void valgrind_stack_deregister(CoroutineUContext *co)
     VALGRIND_STACK_DEREGISTER(co->valgrind_stack_id);
 }
 #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
-#pragma GCC diagnostic error "-Wunused-but-set-variable"
+#pragma GCC diagnostic pop
 #endif
 #endif
 
index f012ec5fc35260bc3aec6c81444ca10c634d3943..ba970f813bf40d8db41c54f201bd1d9d8dba26aa 100644 (file)
@@ -8,11 +8,12 @@
 
 /* pixman-0.16.0 headers have a redundant declaration */
 #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif
 #include <pixman.h>
 #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
-#pragma GCC diagnostic error "-Wredundant-decls"
+#pragma GCC diagnostic pop
 #endif
 
 #include "qemu/typedefs.h"
index d48529a34f831f7d1b17257806451294641fcd8d..b46997a91a6b84ddfec41c3d2c616085155f3f3b 100644 (file)
--- a/ui/gtk.c
+++ b/ui/gtk.c
 
 #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
 /* Work around an -Wstrict-prototypes warning in GTK headers */
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wstrict-prototypes"
 #endif
 #include <gtk/gtk.h>
 #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
-#pragma GCC diagnostic error "-Wstrict-prototypes"
+#pragma GCC diagnostic pop
 #endif