Received: from list by lists.gnu.org with archive (Exim 4.71) id 1f13Br-0002qs-R1 for mharc-grub-devel@gnu.org; Wed, 28 Mar 2018 01:00:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f13Bp-0002qN-1t for grub-devel@gnu.org; Wed, 28 Mar 2018 01:00:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f13Bm-0001ub-0s for grub-devel@gnu.org; Wed, 28 Mar 2018 01:00:01 -0400 Received: from victor.provo.novell.com ([137.65.250.26]:38369 helo=prv3-mh.provo.novell.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f13Bl-0001uO-Nv for grub-devel@gnu.org; Wed, 28 Mar 2018 00:59:57 -0400 Received: from mazu (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (TLS encrypted); Tue, 27 Mar 2018 22:59:39 -0600 Date: Wed, 28 Mar 2018 12:59:35 +0800 From: Michael Chang To: grub-devel@gnu.org Subject: Re: [PATCH] Fix packed-not-aligned error on GCC 8 Message-ID: <20180328045935.x4qqdjho5tk472mh@mazu> Mail-Followup-To: grub-devel@gnu.org References: <1521617508.7171.729.camel@users.sourceforge.net> <20180321094447.5tvd3b2rhhaujuza@mazu> <20180322140905.GF7226@router-fw-old.local.net-space.pl> <20180326085234.c5fzrs7vrpy335dv@mazu> <20180326142820.GA13283@router-fw-old.local.net-space.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180326142820.GA13283@router-fw-old.local.net-space.pl> User-Agent: NeoMutt/20170421 (1.8.2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 137.65.250.26 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2018 05:00:02 -0000 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 > > Tested-by: Michael Chang > > Otherwise, Reviewed-by: Daniel Kiper > > If there are no objections I will apply this in a week or so. Thank you very much. :) Regards, Michael > > Daniel