]> git.ipfire.org Git - thirdparty/grub.git/commit
f2fs: Disable gcc9 -Waddress-of-packed-member
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Wed, 29 May 2019 06:34:55 +0000 (08:34 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 3 Jun 2019 09:18:31 +0000 (11:18 +0200)
commit8e8723a6be548874fe40086a7dc467b5c8fe619b
treec8c8622ebb2e2fd55711a70bc5b0db9631195958
parent53e70d30cf0d18e6c28bab0ab8d223a90d3e1b46
f2fs: Disable gcc9 -Waddress-of-packed-member

Disable the -Wadress-of-packaed-member diagnostic for the grub_f2fs_label
function since the result is found to be false postive.

A pointer to the 'volume_name' member of 'struct grub_f2fs_superblock' is
guaranteed to be aligned as the offset of 'volume_name' within the struct
is dividable by the natural alignment on both 32- and 64-bit targets.

grub-core/fs/f2fs.c: In function ‘grub_f2fs_label’:
grub-core/fs/f2fs.c:1253:60: error: taking address of packed member of ‘struct grub_f2fs_superblock’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
 1253 |     *label = (char *) grub_f2fs_utf16_to_utf8 (data->sblock.volume_name);
      |                                                ~~~~~~~~~~~~^~~~~~~~~~~~
cc1: all warnings being treated as errors

Reported-by: Neil MacLeod <neil@nmacleod.com>
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Tested-by: Neil MacLeod <neil@nmacleod.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/f2fs.c