git: 58862c0bea66 - main - fstyp: Remove __packed from struct exfat_de_label.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Feb 2022 01:33:46 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=58862c0bea66139583f830d21c2f1d98fb844bb0
commit 58862c0bea66139583f830d21c2f1d98fb844bb0
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-02-01 01:33:31 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-02-01 01:33:31 +0000
fstyp: Remove __packed from struct exfat_de_label.
This fixes a -Waddress-of-packed-member warning about a possibly
unaligned pointer from GCC 9 when calling convert_label().
__packed has to be removed from struct exfat_dirent as well to fix an
alignment warning when casting from a struct exfat_dirent pointer to a
struct exfat_de_label pointer.
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D32144
---
usr.sbin/fstyp/exfat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/usr.sbin/fstyp/exfat.c b/usr.sbin/fstyp/exfat.c
index d92d9c828427..80cef5cbf822 100644
--- a/usr.sbin/fstyp/exfat.c
+++ b/usr.sbin/fstyp/exfat.c
@@ -111,7 +111,7 @@ struct exfat_dirent {
} u;
uint32_t xde_first_cluster;
uint64_t xde_data_len;
-} __packed;
+};
#define xde_generic u.xde_generic_
#define xde_secondary_count u.xde_primary_.xde_secondary_count
#define xde_set_chksum u.xde_primary_.xde_set_chksum_
@@ -124,7 +124,7 @@ struct exfat_de_label {
uint8_t xdel_char_cnt; /* Length of UCS-2 label */
uint16_t xdel_vol_lbl[11];
uint8_t xdel_reserved[8];
-} __packed;
+};
_Static_assert(sizeof(struct exfat_de_label) == 32, "spec");
#define MAIN_BOOT_REGION_SECT 0