From 2d4815c7f5d8c944ed6d755788f8ab956e2db505 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 30 Oct 2023 23:02:42 +0100 Subject: [PATCH] gh-90815: Fix mimalloc atomic.h on Windows arm64 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) --- Include/internal/mimalloc/mimalloc/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/internal/mimalloc/mimalloc/atomic.h b/Include/internal/mimalloc/mimalloc/atomic.h index c6b8146ffdb049..eb8478ceed6adf 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