From c95e3080a44946ac5739542b549f5a10ee4ec377 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 22 Feb 2013 21:08:51 +0100 Subject: Reenable -Wstrict-prototypes One part of this patch reverts commit 22bc9a46, which disabled the warning. The rest of it deals with the warning by adding a #pragma for newer gcc and by disabling -Werror for compilers that can't deal with the #pragma. Signed-off-by: Kevin Wolf Message-id: 1361563731-13307-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori --- ui/gtk.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/gtk.c b/ui/gtk.c index 5f91de4..008a6f8 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -34,7 +34,18 @@ #define GETTEXT_PACKAGE "qemu" #define LOCALEDIR "po" +#include "qemu-common.h" + +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE +/* Work around an -Wstrict-prototypes warning in GTK headers */ +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#endif #include +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE +#pragma GCC diagnostic error "-Wstrict-prototypes" +#endif + + #include #include #include @@ -46,7 +57,6 @@ #include #include -#include "qemu-common.h" #include "ui/console.h" #include "sysemu/sysemu.h" #include "qmp-commands.h" -- cgit v1.1