[Spice-devel] [PATCH spice-server] build: Fix wrong -Wno-missing-field-initializers detection

Christophe Fergeau cfergeau at redhat.com
Wed Nov 9 10:39:00 UTC 2016


Hey,

On Wed, Nov 09, 2016 at 09:13:32AM +0000, Frediano Ziglio wrote:
> The small code in m4/manywarnings.m4 wrongly detects if
> -Wno-missing-field-initializers is needed. This happens if
> -Wunused-variable is set. In this case the code fails to compile
> due to -Werror even if -Wno-missing-field-initializers would be
> perfectly fine.

This m4 macro comes from gnulib:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=m4/manywarnings.m4;h=89fd0ae38e387b9451fb62cb37936ccaefff3686;hb=HEAD#l55
so this would need to be fixed there first.

Christophe

> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  m4/manywarnings.m4 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
> index 3e6dd21..dab6a0b 100644
> --- a/m4/manywarnings.m4
> +++ b/m4/manywarnings.m4
> @@ -62,10 +62,11 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
>          CFLAGS="$CFLAGS -W -Werror"
>          AC_COMPILE_IFELSE(
>            [AC_LANG_PROGRAM(
> -             [[void f (void)
> +             [[int f (void)
>                 {
>                   typedef struct { int a; int b; } s_t;
>                   s_t s1 = { 0, };
> +                 return s1.b;
>                 }
>               ]],
>               [[]])],
> -- 
> 2.7.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161109/881501c8/attachment.sig>


More information about the Spice-devel mailing list