From ddf58eb2f82181ada4fc2a1e872790a7dae703e4 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 19 Jan 2026 19:29:03 +0200 Subject: [PATCH] [VFATLIB] Add packing to LFN_ENT structure The structure is packed in the original dosfstools code, too. Fixes GCC 13 warning: C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/lfn.c: In function 'lfn_add_slot': C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/lfn.c:208:5: warning: converting a packed 'DIR_ENT' pointer (alignment 1) to a 'LFN_ENT' pointer (alignment 2) may result in an unaligned pointer value [-Waddress-of-packed-member] 208 | LFN_ENT *lfn = (LFN_ENT *) de; | ^~~~~~~ In file included from C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/dosfsck.h:8, from C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/vfatlib.h:25, from C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/lfn.c:24: C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/fsck.fat.h:165:9: note: defined here 165 | typedef struct { | ^~~~~~ C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/lfn.c:29:9: note: defined here 29 | typedef struct { | ^~~~~~ --- sdk/lib/fslib/vfatlib/check/lfn.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/lib/fslib/vfatlib/check/lfn.c b/sdk/lib/fslib/vfatlib/check/lfn.c index a9af62bde6a..81188693664 100644 --- a/sdk/lib/fslib/vfatlib/check/lfn.c +++ b/sdk/lib/fslib/vfatlib/check/lfn.c @@ -26,6 +26,10 @@ #define NDEBUG #include +#ifdef __REACTOS__ +#include +#endif + typedef struct { uint8_t id; /* sequence number for slot */ uint8_t name0_4[10]; /* first 5 characters in name */ @@ -37,6 +41,10 @@ typedef struct { uint8_t name11_12[4]; /* last 2 characters in name */ } LFN_ENT; +#ifdef __REACTOS__ +#include +#endif + #define LFN_ID_START 0x40 #define LFN_ID_SLOTMASK 0x1f