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

Alon Levy alevy at redhat.com
Fri May 4 00:16:49 PDT 2012


On Thu, May 03, 2012 at 05:33:31PM +0200, Christophe Fergeau wrote:
> 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.

The annoying thing is where does one find CWARNFLAGS, never mentioned in
those patches. Also, I guess X.Org should be fixed, but not that easy,
so

ACK

> ---
>  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
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list