mirror of
https://github.com/reactos/reactos.git
synced 2026-05-23 15:50:29 +08:00
[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 {
| ^~~~~~
This commit is contained in:
@@ -26,6 +26,10 @@
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#ifdef __REACTOS__
|
||||
#include <pshpack1.h>
|
||||
#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 <poppack.h>
|
||||
#endif
|
||||
|
||||
#define LFN_ID_START 0x40
|
||||
#define LFN_ID_SLOTMASK 0x1f
|
||||
|
||||
|
||||
Reference in New Issue
Block a user