From: Victor Stinner Date: Mon, 30 Oct 2023 22:33:49 +0000 (+0100) Subject: gh-90815: Fix mimalloc atomic.h on Windows arm64 (#111527) X-Git-Tag: v3.13.0a2~270 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=801741ff8155623fe6483971e68f30ff654323bc;p=thirdparty%2FPython%2Fcpython.git 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) --- diff --git a/Include/internal/mimalloc/mimalloc/atomic.h b/Include/internal/mimalloc/mimalloc/atomic.h index c6b8146ffdb0..eb8478ceed6a 100644 --- a/Include/internal/mimalloc/mimalloc/atomic.h +++ b/Include/internal/mimalloc/mimalloc/atomic.h @@ -195,7 +195,7 @@ static inline uintptr_t mi_atomic_load_explicit(_Atomic(uintptr_t) const* p, mi_ #else uintptr_t x = *p; 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; #endif