qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [qemu-s390x] [PATCH 13/14] hw/s390x/ipl: avoid taking a


From: Thomas Huth
Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH 13/14] hw/s390x/ipl: avoid taking address of fields in packed struct
Date: Fri, 29 Mar 2019 16:51:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0

On 29/03/2019 12.11, Daniel P. Berrangé wrote:
> Compiling with GCC 9 complains
> 
> hw/s390x/ipl.c: In function ‘s390_ipl_set_boot_menu’:
> hw/s390x/ipl.c:256:25: warning: taking address of packed member of ‘struct 
> QemuIplParameters’ may result in an unaligned pointer value 
> [-Waddress-of-packed-member]
>   256 |     uint32_t *timeout = &ipl->qipl.boot_menu_timeout;
>       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> This local variable is only present to save a little bit of
> typing when setting the field later. Get rid of this to avoid
> the warning about unaligned accesses.
> 
> Signed-off-by: Daniel P. Berrangé <address@hidden>
> ---

Reviewed-by: Thomas Huth <address@hidden>



reply via email to

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