Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 May 2022 00:30:03 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: ecd5ade6dcf7 - stable/13 - fstyp: Remove __packed from struct exfat_de_label.
Message-ID:  <202205110030.24B0U3wx056461@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=ecd5ade6dcf718cc0622edd42228a952e8154b4f

commit ecd5ade6dcf718cc0622edd42228a952e8154b4f
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-02-01 01:33:31 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-05-11 00:04: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
    
    (cherry picked from commit 58862c0bea66139583f830d21c2f1d98fb844bb0)
---
 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205110030.24B0U3wx056461>