From ba99fecdefa3295752d9b55731d9ccca0a4d59d6 Mon Sep 17 00:00:00 2001 From: Wojciech Mamrak Date: Mon, 15 Dec 2025 17:12:12 +0100 Subject: [PATCH] MSVC: Fix warning C4244 in zend_get_gc_buffer_use This PR addresses a compilation warning of the form: warning C4244: '=': conversion from '__int64' to 'int', possible loss of data The expression gc_buffer->cur - gc_buffer->start produces a temporary of type ptrdiff_t, which is then assigned to an int. It causes said compilation warning if these types do not match. --- Zend/zend_gc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h index 06f550647bd79..8cf13ef6483de 100644 --- a/Zend/zend_gc.h +++ b/Zend/zend_gc.h @@ -167,7 +167,7 @@ static zend_always_inline void zend_get_gc_buffer_add_ptr( static zend_always_inline void zend_get_gc_buffer_use( zend_get_gc_buffer *gc_buffer, zval **table, int *n) { *table = gc_buffer->start; - *n = gc_buffer->cur - gc_buffer->start; + *n = (int)(gc_buffer->cur - gc_buffer->start); } END_EXTERN_C()