[Spice-devel] [PATCH spice-server] build: do not warn about address-of-packed-member

Frediano Ziglio fziglio at redhat.com
Tue May 7 09:53:45 UTC 2019


> 
> The gcc warning address-of-packed-member is new and on by
> default in gcc 9.
> 
> Many of the structures sent over the network are packed
> and with unaligned fields.
> 
> This breaks the build -- due to -Werror.
> Tell gcc to not warn about it.
> 
> Signed-off-by: Uri Lublin <uril at redhat.com>

What are the warning exactly for?
Sure we don't want to fix them?

> ---
>  m4/manywarnings.m4 | 1 +
>  meson.build        | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
> index 4f701f4ea..20543d4a4 100644
> --- a/m4/manywarnings.m4
> +++ b/m4/manywarnings.m4
> @@ -174,6 +174,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
>      -Wmultichar \
>      -Wnarrowing \
>      -Wnested-externs \
> +    -Wno-address-of-packed-member \
>      -Wnonnull \
>      -Wnonnull-compare \
>      -Wnull-dereference \
> diff --git a/meson.build b/meson.build
> index 93fbdfff9..b8dde96a8 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -42,6 +42,7 @@ spice_server_global_cflags = ['-DSPICE_SERVER_INTERNAL',
>                                '-Wall',
>                                '-Wextra',
>                                '-Wno-sign-compare',
> +                              '-Wno-address-of-packed-member',
>                                '-Wno-unused-parameter']
>  
>  compiler = meson.get_compiler('c')


More information about the Spice-devel mailing list