gh-90815: Fix mimalloc atomic.h on Windows arm64 (#111527)

mi_atomic_load_explicit() casts 'p' argument to drop the 'const'
qualifier on Windows arm64 platform. Fix the compiler warning:

    'function': different 'const' qualifiers
    (compiling source file ..\Objects\mimalloc\options.c)
This commit is contained in:
Victor Stinner 2023-10-30 23:33:49 +01:00 committed by GitHub
parent 1673e44017
commit 801741ff81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,7 +195,7 @@ static inline uintptr_t mi_atomic_load_explicit(_Atomic(uintptr_t) const* p, mi_
#else #else
uintptr_t x = *p; uintptr_t x = *p;
if (mo > mi_memory_order_relaxed) { if (mo > mi_memory_order_relaxed) {
while (!mi_atomic_compare_exchange_weak_explicit(p, &x, x, mo, mi_memory_order_relaxed)) { /* nothing */ }; while (!mi_atomic_compare_exchange_weak_explicit((_Atomic(uintptr_t)*)p, &x, x, mo, mi_memory_order_relaxed)) { /* nothing */ };
} }
return x; return x;
#endif #endif