[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix packed-not-aligned error on GCC 8
From: |
Michael Chang |
Subject: |
Re: [PATCH] Fix packed-not-aligned error on GCC 8 |
Date: |
Wed, 28 Mar 2018 12:59:35 +0800 |
User-agent: |
NeoMutt/20170421 (1.8.2) |
On Mon, Mar 26, 2018 at 04:28:20PM +0200, Daniel Kiper wrote:
> On Mon, Mar 26, 2018 at 04:52:34PM +0800, Michael Chang wrote:
> > When building with GCC 8, there are several errors regarding
> > packed-not-aligned.
> >
> > ./include/grub/gpt_partition.h:79:1: error: alignment 1 of ???struct
> > grub_gpt_partentry??? is less than 8 [-Werror=packed-not-aligned]
> >
> > This patch tries to fix the build error by cleaning up the ambiguity of
> > placing
>
> s/tries to fix/fixes/?
Yes. I think the patch is adequate to say so.
>
> > aligned structure in a packed one. In "struct grub_btrfs_time" and "struct
> > grub_gpt_part_type", the aligned attribute seems to be superfluous, and also
> > has to be packed, to ensure the structure is bit-to-bit mapped to the format
> > laid on disk. I think we could blame to copy and paste error here for the
> > mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as
> > the name suggests. :)
> >
> > Signed-off-by: Michael Chang <address@hidden>
> > Tested-by: Michael Chang <address@hidden>
>
> Otherwise, Reviewed-by: Daniel Kiper <address@hidden>
>
> If there are no objections I will apply this in a week or so.
Thank you very much. :)
Regards,
Michael
>
> Daniel