On 3/29/22 13:24, Rémi Bernon wrote:
On 3/29/22 20:21, Zebediah Figura wrote:
On 3/29/22 12:39, Rémi Bernon wrote:
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
dlls/ntoskrnl.exe/instr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/ntoskrnl.exe/instr.c b/dlls/ntoskrnl.exe/instr.c index 8f1aa4d45a3..05976c38b27 100644 --- a/dlls/ntoskrnl.exe/instr.c +++ b/dlls/ntoskrnl.exe/instr.c @@ -497,8 +497,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(int); #define SIB_BASE( sib, rex ) (((sib) & 7) | (((rex) & REX_B) ? 8 : 0)) /* keep in sync with dlls/ntdll/thread.c:thread_init */ -static const BYTE *wine_user_shared_data = (BYTE *)0x7ffe0000; -static const BYTE *user_shared_data = (BYTE *)0xfffff78000000000; +static const volatile BYTE *const volatile wine_user_shared_data = (BYTE *)0x7ffe0000; +static const volatile BYTE *const volatile user_shared_data = (BYTE *)0xfffff78000000000;
I might be misunderstanding something, but I don't think "static const volatile" makes sense? I.e. the second "volatile" probably shouldn't be there.
I think we had the discussion already last time I sent the patch, and this is the version we ended up upon.
The warning fix is actually about making the pointers themselves volatile, GCC 11 doesn't like us accessing a pointer to a fixed address, which it considers as an empty array.
Right, I forgot about that...
Could we maybe add a comment in the code to that effect as well?