qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] build: try improve handling of clang warning


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH v2] build: try improve handling of clang warnings
Date: Fri, 9 Mar 2018 15:08:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 09.03.2018 14:59, Gerd Hoffmann wrote:
> This patch disables the pragma diagnostic -Wunused-but-set-variable for
> clang in util/coroutine-ucontext.c.
> 
> This in turn allows us to remove it from the configure check, so the
> CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE will succeed for clang.
> 
> With that in place clang builds (linux) will use -Werror by default,
> which breaks the build due to warning about unaligned struct members.
> 
> Just turning off this warning isn't a good idea as it indicates
> portability problems.  So make it a warning again, using
> -Wno-error=address-of-packed-member.  That way it doesn't break the
> build but still shows up in the logs.
> 
> Now clang builds qemu without errors.  Well, almost.  There are some
> left in the rdma code.  Leaving that to the rdma people.  All others can
> use --disable-rdma to workarounds this.
> 
> Cc: Philippe Mathieu-Daudé <address@hidden>
> Cc: Thomas Huth <address@hidden>
> Cc: Peter Maydell <address@hidden>
> Signed-off-by: Gerd Hoffmann <address@hidden>
> ---
>  configure                 | 2 +-
>  util/coroutine-ucontext.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Thomas Huth <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]