77 lines
2.4 KiB
Diff
77 lines
2.4 KiB
Diff
From b96f7bc26c92c400435144cd0f751820e67af33b Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
|
Date: Wed, 6 Feb 2013 19:28:00 +0100
|
|
Subject: [PATCH spice-gtk 3/3] build-sys: don't use -Wstrict-prototypes with
|
|
Gtk+ 2.0
|
|
|
|
---
|
|
configure.ac | 13 ++++++++++++-
|
|
m4/spice-compile-warnings.m4 | 16 +++++++---------
|
|
2 files changed, 19 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 2a5c72c..f02552f 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -627,7 +627,18 @@ fi
|
|
dnl ===========================================================================
|
|
dnl check compiler flags
|
|
|
|
-SPICE_COMPILE_WARNINGS
|
|
+# We want to enable these, but need to sort out the
|
|
+# decl mess with gtk/generated_*.c
|
|
+dontwarn="-Wmissing-prototypes -Wmissing-declarations"
|
|
+
|
|
+# We want to enable these, but Gtk+2.0 has a bad decl
|
|
+# gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function declaration
|
|
+# isn't a prototype.
|
|
+if test "$with_gtk" = "2.0"; then
|
|
+ dontwarn="$dontwarn -Wstrict-prototypes"
|
|
+fi
|
|
+
|
|
+SPICE_COMPILE_WARNINGS([$dontwarn])
|
|
|
|
SPICE_CFLAGS="$SPICE_CFLAGS $WARN_CFLAGS"
|
|
|
|
diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
|
|
index 3c7e0d3..31fc0fc 100644
|
|
--- a/m4/spice-compile-warnings.m4
|
|
+++ b/m4/spice-compile-warnings.m4
|
|
@@ -1,7 +1,8 @@
|
|
-dnl
|
|
-dnl Enable all known GCC compiler warnings, except for those
|
|
-dnl we can't yet cope with
|
|
-dnl
|
|
+# SPICE_COMPILE_WARNINGS(DONTWARN)
|
|
+# --------------------------------------------------------
|
|
+# Enable all known GCC compiler warnings, except for those
|
|
+# we can't yet cope with
|
|
+#
|
|
AC_DEFUN([SPICE_COMPILE_WARNINGS],[
|
|
dnl ******************************
|
|
dnl More compiler warnings
|
|
@@ -19,6 +20,8 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
|
|
|
|
# List of warnings that are not relevant / wanted
|
|
|
|
+ dontwarn=$1
|
|
+
|
|
# Don't care about C++ compiler compat
|
|
dontwarn="$dontwarn -Wc++-compat"
|
|
dontwarn="$dontwarn -Wabi"
|
|
@@ -59,11 +62,6 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
|
|
dontwarn="$dontwarn -Wbad-function-cast"
|
|
dontwarn="$dontwarn -Wshadow"
|
|
|
|
- # We want to enable thse, but need to sort out the
|
|
- # decl mess with gtk/generated_*.c
|
|
- dontwarn="$dontwarn -Wmissing-prototypes"
|
|
- dontwarn="$dontwarn -Wmissing-declarations"
|
|
-
|
|
# Get all possible GCC warnings
|
|
gl_MANYWARN_ALL_GCC([maybewarn])
|
|
|
|
--
|
|
1.8.1.1.439.g50a6b54
|
|
|