diff --git a/compat/atomics/win32/stdatomic.h b/compat/atomics/win32/stdatomic.h index bb8e6e7e15..28a627bfd3 100644 --- a/compat/atomics/win32/stdatomic.h +++ b/compat/atomics/win32/stdatomic.h @@ -96,7 +96,7 @@ do { \ atomic_load(object) #define atomic_exchange(object, desired) \ - InterlockedExchangePointer(object, desired); + InterlockedExchangePointer((PVOID volatile *)object, (PVOID)desired) #define atomic_exchange_explicit(object, desired, order) \ atomic_exchange(object, desired)