From 9e84a278a3bfee575fee71f64e47f0114a03c7e1 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 5 Jun 2025 17:09:52 +0900 Subject: [PATCH] Win: Cast of qualifier in `rbimpl_atomic_u64_load_relaxed` --- ruby_atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby_atomic.h b/ruby_atomic.h index 2b4c16ba07..216e292571 100644 --- a/ruby_atomic.h +++ b/ruby_atomic.h @@ -43,7 +43,7 @@ rbimpl_atomic_u64_load_relaxed(const uint64_t *value) return __atomic_load_n(value, __ATOMIC_RELAXED); #elif defined(_WIN32) uint64_t val = *value; - return InterlockedCompareExchange64(value, val, val); + return InterlockedCompareExchange64(RBIMPL_CAST((uint64_t *)value), val, val); #elif defined(__sun) && defined(HAVE_ATOMIC_H) && (defined(_LP64) || defined(_I32LPx)) uint64_t val = *value; return atomic_cas_64(value, val, val);