From af636bca298d95fc14c04c07b28dedaf0819975c Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 1 Dec 2026 17:50:08 +0100 Subject: [PATCH] Fix MSVC atomic mismatch warning (C4090) --- ext/opcache/zend_accelerator_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opcache/zend_accelerator_hash.c b/ext/opcache/zend_accelerator_hash.c index 52bfe773b2e4..83d179cf7b06 100644 --- a/ext/opcache/zend_accelerator_hash.c +++ b/ext/opcache/zend_accelerator_hash.c @@ -31,7 +31,7 @@ void zend_accel_hash_clean(zend_accel_hash *accel_hash) { accel_hash->num_entries = 0; accel_hash->num_direct_entries = 0; - memset(accel_hash->hash_table, 0, sizeof(*accel_hash->hash_table)*accel_hash->max_num_entries); + memset((uintptr_t *)accel_hash->hash_table, 0, sizeof(*accel_hash->hash_table)*accel_hash->max_num_entries); } void zend_accel_hash_init(zend_accel_hash *accel_hash, uint32_t hash_size) @@ -62,7 +62,7 @@ void zend_accel_hash_init(zend_accel_hash *accel_hash, uint32_t hash_size) zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Insufficient shared memory!"); return; } - memset(accel_hash->hash_table, 0, sizeof(*accel_hash->hash_table)*accel_hash->max_num_entries); + memset((uintptr_t *)accel_hash->hash_table, 0, sizeof(*accel_hash->hash_table)*accel_hash->max_num_entries); } /* Returns NULL if hash is full