https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0535332a6947379366ade2...
commit 0535332a6947379366ade2e772849ad6a3e89f39 Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Sat Aug 14 15:34:46 2021 +0200 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Sat Sep 11 18:31:50 2021 +0200
[FASTFAT_NEW] "Fix" Flags bitfield to avoid RTC error
Since VS 16.11 the compiler sometimes emits calls to _RTC_UninitUse, when parts of a bitfield are initialized (See https://developercommunity.visualstudio.com/t/Broken-runtime-checks-with-CL-...). Fix this by using an ULONG instead of a bitfield. Note: The structure uses a 24 bit bitfield plus an UCHAR, which is supposed to form a 32 bit field, but that doesn't work anyway. --- drivers/filesystems/fastfat_new/fatstruc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/filesystems/fastfat_new/fatstruc.h b/drivers/filesystems/fastfat_new/fatstruc.h index d12721febbe..59aa7bb0f0f 100644 --- a/drivers/filesystems/fastfat_new/fatstruc.h +++ b/drivers/filesystems/fastfat_new/fatstruc.h @@ -1370,8 +1370,12 @@ typedef struct _CCB { // Define a 24bit wide field for Flags, but a UCHAR for Wild Cards Present // since it is used so often. Line these up on byte boundaries for grins. // - +#ifdef __REACTOS__ + ULONG Flags; // Due to https://developercommunity.visualstudio.com/t/Broken-runtime-checks-with-CL-... + // Note: the following BOOLEAN will not be packed anyway! +#else ULONG Flags:24; +#endif BOOLEAN ContainsWildCards;
//