Skip to content

Commit ba99fec

Browse files
committed
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.
1 parent a35e616 commit ba99fec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_gc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static zend_always_inline void zend_get_gc_buffer_add_ptr(
167167
static zend_always_inline void zend_get_gc_buffer_use(
168168
zend_get_gc_buffer *gc_buffer, zval **table, int *n) {
169169
*table = gc_buffer->start;
170-
*n = gc_buffer->cur - gc_buffer->start;
170+
*n = (int)(gc_buffer->cur - gc_buffer->start);
171171
}
172172

173173
END_EXTERN_C()

0 commit comments

Comments
 (0)