Patchwork pixman: fix warning

login
register
mail settings
Submitter Gerd Hoffmann
Date Jan. 4, 2013, 2:59 p.m.
Message ID <1357311593-27749-1-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/209477/
State New
Headers show

Comments

Gerd Hoffmann - Jan. 4, 2013, 2:59 p.m.
Cc: afaerber@suse.de
Cc: agraf@suse.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 include/ui/qemu-pixman.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Gerd Hoffmann - Jan. 4, 2013, 3:47 p.m.
Hi,

>> +/* 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

Patch

diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
index 3c05c83..63b8ccc 100644
--- a/include/ui/qemu-pixman.h
+++ b/include/ui/qemu-pixman.h
@@ -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"