[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] crypto/block: Fix build with gcc 9
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] crypto/block: Fix build with gcc 9 |
Date: |
Thu, 28 Feb 2019 09:28:08 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 |
On 2/28/19 9:06 AM, Greg Kurz wrote:
> Build fails with gcc 9:
>
> crypto/block-luks.c:689:18: error: taking address of packed member of ‘struct
> QCryptoBlockLUKSHeader’ may result in an unaligned pointer value
> [-Werror=address-of-packed-member]
> 689 | be32_to_cpus(&luks->header.payload_offset);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> All members of the QCryptoBlockLUKSKeySlot and QCryptoBlockLUKSHeader are
> naturally aligned and we already check at build time there isn't any
> unwanted padding. Drop the QEMU_PACKED attribute.
>
> Signed-off-by: Greg Kurz <address@hidden>
> ---
> crypto/block-luks.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org