Skip to contentSkip to conversation

pixman: fix warning

PATCH In review Gerd Hoffmann 2 participants 3 messages Jan 4, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pixman: fix warning

---
 include/ui/qemu-pixman.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/ui/qemu-pixman.h +4 -0
index 3c05c83..63b8ccc 100644
@@ -6,7 +6,11 @@
 #ifndef QEMU_PIXMAN_H
 #define QEMU_PIXMAN_H
 
+/* pixman-0.16.0 headers have a redundant declaration */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
 #include <pixman.h>
+#pragma GCC diagnostic pop
 
 #include "console.h"
 
Signature · 1 line
1.7.1
#1 lore raw
Quoted 12 lines · Gerd Hoffmann
---
 include/ui/qemu-pixman.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/ui/qemu-pixman.h +0 -0
index 3c05c83..63b8ccc 100644

include/ui/qemu-pixman.h line 13

Quoted 8 lines
include/ui/qemu-pixman.h +4 -0
@@ -6,7 +6,11 @@
 #ifndef QEMU_PIXMAN_H
 #define QEMU_PIXMAN_H
 
+/* pixman-0.16.0 headers have a redundant declaration */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
 #include <pixman.h>
+#pragma GCC diagnostic pop

IIRC we can't rely on gcc knowing about 'diagnostic push/pop' -- eg in coroutine-ucontext.c we avoid using that for this reason.

-- PMM

#2 lore raw

Hi,

Quoted 8 lines

include/ui/qemu-pixman.h line 13

Quoted 5 lines
include/ui/qemu-pixman.h +4 -0
+/* pixman-0.16.0 headers have a redundant declaration */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
 #include <pixman.h>
+#pragma GCC diagnostic pop

IIRC we can't rely on gcc knowing about 'diagnostic push/pop' -- eg in coroutine-ucontext.c we avoid using that for this reason.

Indeed, even '#pragma GCC diagnostic' isn't reliable.

/me goes grab stuff from coroutine-ucontext.c and run that through bunch of testbuilds ...

cheers,

Gerd