mirror of
https://github.com/reactos/reactos.git
synced 2026-05-22 15:20:29 +08:00
GCC 13 thinks that a global 'const PULONG' that is initialized to a non-NULL value points to an object that is "likely at address zero".
- Turn the macros that cause the issue into inline functions and wrap them with a GCC diagnostic pragma to silence the warning
- Use KiNtVdmState in vdm/vdmexec.c
- Remove the (duplicated) VdmState macro
In function '_InterlockedAnd',
inlined from 'KiVdmOpcodePOPF' at C:/ReactOS/reactos/ntoskrnl/ke/i386/v86vdm.c:164:5:
C:/ReactOS/reactos/sdk/include/vcruntime/mingw32/intrin_x86.h:245:16: error: '__sync_fetch_and_and_4' writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
245 | return __sync_fetch_and_and(value, mask);
| ^~~~~~~~~~~~~~~~~~~~
In function 'KiVdmOpcodePOPF':
cc1.exe: note: destination object is likely at address zero