Skip to content

fix gcc9 build with -Werror=address-of-packed-member

Michael Chang grub-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 1 replyIn review
  2. v18 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8cpio: disable gcc9 -Waddress-of-packed-membergrub-core/fs/cpio_common.c+9 -00 replies
2/8jfs: disable gcc9 -Waddress-of-packed-membergrub-core/fs/jfs.c+7 -00 replies
3/8hfs: fix gcc9 error -Waddress-of-packed-memberinclude/grub/hfs.h+1 -10 replies
4/8hfsplus: fix gcc9 error with -Waddress-of-packed-membergrub-core/fs/hfsplus.c+40 -170 replies
5/8acpi: fix gcc9 error -Waddress-of-packed-memberinclude/grub/acpi.h+1 -10 replies
6/8usbtest: disable gcc9 -Waddress-of-packed-membergrub-core/commands/usbtest.c+9 -00 replies
7/8chainloader: fix gcc9 error -Waddress-of-packed-membergrub-core/loader/efi/chainloader.c+9 -30 replies
8/8efi: fix gcc9 error -Waddress-of-packed-membergrub-core/kern/efi/efi.c+24 -30 replies

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDaniel Kiper
SeriesR-b
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/8] fix gcc9 build with -Werror=address-of-packed-member

This patch set attempts to resolve the build failure in openSUSE build service equipped with new gcc 9 compiler, which has added a new warning flag -Waddress-of-packed-member.

The new warning performs the check for taking the address of packed member directly to a pointer variable with higher alignment requirement and the outcome is risky to memory alignment fault on some architecture when deferencing it.

Please help to review.

Thanks.

v2: Disable -Werror=address-of-packed-member if its diagnose turns out to be false positive.

Michael Chang (8):
cpio: disable gcc9 -Waddress-of-packed-member
jfs: disable gcc9 -Waddress-of-packed-member
hfs: fix gcc9 error -Waddress-of-packed-member
hfsplus: fix gcc9 error with -Waddress-of-packed-member
acpi: fix gcc9 error -Waddress-of-packed-member
usbtest: disable gcc9 -Waddress-of-packed-member
chainloader: fix gcc9 error -Waddress-of-packed-member
efi: fix gcc9 error -Waddress-of-packed-member

 grub-core/commands/usbtest.c       |  9 ++++++
 grub-core/fs/cpio_common.c         |  9 ++++++
 grub-core/fs/hfsplus.c             | 57 ++++++++++++++++++++++++++------------
 grub-core/fs/jfs.c                 |  7 +++++
 grub-core/kern/efi/efi.c           | 27 ++++++++++++++++--
 grub-core/loader/efi/chainloader.c | 12 ++++++--
 include/grub/acpi.h                |  2 +-
 include/grub/hfs.h                 |  2 +-
 8 files changed, 100 insertions(+), 25 deletions(-)
Signature · 1 line
2.16.4