From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Greg Kurz <groug@kaod.org>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] crypto/block: Fix build with gcc 9
Date: Thu, 28 Feb 2019 18:06:29 +0000 [thread overview]
Message-ID: <20190228180629.GI9217@redhat.com> (raw)
In-Reply-To: <155136636659.26299.15306206822524053043.stgit@bahia.lan>
On Thu, Feb 28, 2019 at 04:06:06PM +0100, 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);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> crypto/block-luks.c:690:18: error: taking address of packed member of ‘struct QCryptoBlockLUKSHeader’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
> 690 | be32_to_cpus(&luks->header.key_bytes);
> | ^~~~~~~~~~~~~~~~~~~~~~~
> crypto/block-luks.c:691:18: error: taking address of packed member of ‘struct QCryptoBlockLUKSHeader’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
> 691 | be32_to_cpus(&luks->header.master_key_iterations);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> ... a bunch of similar errors...
>
> crypto/block-luks.c:1288:22: error: taking address of packed member of ‘struct QCryptoBlockLUKSKeySlot’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
> 1288 | be32_to_cpus(&luks->header.key_slots[i].stripes);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> 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 <groug@kaod.org>
> ---
> crypto/block-luks.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
I'll queue this one.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
prev parent reply other threads:[~2019-02-28 18:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 15:06 [Qemu-devel] [PATCH] crypto/block: Fix build with gcc 9 Greg Kurz
2019-02-28 15:28 ` Eric Blake
2019-02-28 18:06 ` Daniel P. Berrangé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190228180629.GI9217@redhat.com \
--to=berrange@redhat.com \
--cc=groug@kaod.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.