From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1hDoHf-0007zW-BG for mharc-grub-devel@gnu.org; Tue, 09 Apr 2019 06:47:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDoHc-0007ys-KW for grub-devel@gnu.org; Tue, 09 Apr 2019 06:47:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDoHa-0006mt-Lg for grub-devel@gnu.org; Tue, 09 Apr 2019 06:47:16 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:38493) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hDoHY-0006k9-Ny for grub-devel@gnu.org; Tue, 09 Apr 2019 06:47:14 -0400 Received: from mercury.suse.de (prva10-snat226-2.provo.novell.com [137.65.226.36]) by smtp2.provo.novell.com with ESMTP (NOT encrypted); Tue, 09 Apr 2019 04:47:04 -0600 From: Michael Chang To: grub-devel@gnu.org Subject: [PATCH 3/8] hfs: fix gcc9 error address-of-packed-member Date: Tue, 9 Apr 2019 18:46:54 +0800 Message-Id: <20190409104659.4125-4-mchang@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190409104659.4125-1-mchang@suse.com> References: <20190409104659.4125-1-mchang@suse.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 137.65.250.81 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: Tue, 09 Apr 2019 10:47:17 -0000 Add missing packed attribute to struct grub_hfs_extent. The solved gcc9 error like this. [ 83s] ../grub-core/fs/hfs.c: In function 'grub_hfs_iterate_records': [ 83s] ../grub-core/fs/hfs.c:699:9: error: taking address of packed member of 'struct grub_hfs_sblock' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 83s] 699 | ? (&data->sblock.catalog_recs) [ 83s] | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 83s] ../grub-core/fs/hfs.c:700:9: error: taking address of packed member of 'struct grub_hfs_sblock' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 83s] 700 | : (&data->sblock.extent_recs)); [ 83s] | ~^~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Michael Chang --- include/grub/hfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grub/hfs.h b/include/grub/hfs.h index d935f5005..e27993c42 100644 --- a/include/grub/hfs.h +++ b/include/grub/hfs.h @@ -29,7 +29,7 @@ struct grub_hfs_extent /* The first physical block. */ grub_uint16_t first_block; grub_uint16_t count; -}; +} GRUB_PACKED; /* HFS stores extents in groups of 3. */ typedef struct grub_hfs_extent grub_hfs_datarecord_t[3]; -- 2.16.4