[Spice-devel] [PATCH] Disable qualifier cast warning from GCC

Christophe Fergeau cfergeau at redhat.com
Thu May 3 08:33:31 PDT 2012


X.Org adds -Wcast-qual to its default WARNCFLAGS, but then it
doesn't use const in the API it exports, which leads to warnings
when trying to initialize some fields of the various DriverRec
structures with string literals.
---
 configure.ac |    1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index a18910a..c8fe3ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,7 @@ m4_ifndef([XORG_MACROS_VERSION],
           [m4_fatal([you must install X.Org util-macros 1.4 or later (or the corresponding package from your distribution) before running autoconf/autogen])])
 XORG_MACROS_VERSION(1.4)
 XORG_DEFAULT_OPTIONS
+CWARNFLAGS="-Wno-cast-qual"
 
 # Initialize libtool
 AC_DISABLE_STATIC
-- 
1.7.10



More information about the Spice-devel mailing list