Skip to content

Commit 26b9780

Browse files
TysonAndrenikic
authored andcommitted
Fix compilation error on mac with -Wshift-negative-value
Fix for mac OS build error seen in ccc49ea when shifting -1 (max argument count?) ``` ext/opcache/jit/zend_jit_trace.c:1668:2: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] TRACE_FRAME_INIT(frame, op_array, 0, -1); ``` Closes GH-5284.
1 parent dcca039 commit 26b9780

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/jit/zend_jit_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ struct _zend_jit_trace_stack_frame {
352352
_frame->call = NULL; \
353353
_frame->prev = NULL; \
354354
_frame->func = (const zend_function*)_func; \
355-
_frame->_info = (uint32_t)((((int)(num_args)) << TRACE_FRAME_SHIFT_NUM_ARGS) & TRACE_FRAME_MASK_NUM_ARGS); \
355+
_frame->_info = (((uint32_t)(num_args)) << TRACE_FRAME_SHIFT_NUM_ARGS) & TRACE_FRAME_MASK_NUM_ARGS; \
356356
if (nested) { \
357357
_frame->_info |= TRACE_FRAME_MASK_NESTED; \
358358
}; \

0 commit comments

Comments
 (0)