From 26b9780d02bba64abf0787f08524e29f73c06c94 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Sat, 21 Mar 2020 11:56:44 -0400 Subject: [PATCH] Fix compilation error on mac with -Wshift-negative-value Fix for mac OS build error seen in ccc49ead681add7bdf6a021c7a3420aff543bc1e 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. --- ext/opcache/jit/zend_jit_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index 4a71ff58f5..60f9520d0b 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -352,7 +352,7 @@ struct _zend_jit_trace_stack_frame { _frame->call = NULL; \ _frame->prev = NULL; \ _frame->func = (const zend_function*)_func; \ - _frame->_info = (uint32_t)((((int)(num_args)) << TRACE_FRAME_SHIFT_NUM_ARGS) & TRACE_FRAME_MASK_NUM_ARGS); \ + _frame->_info = (((uint32_t)(num_args)) << TRACE_FRAME_SHIFT_NUM_ARGS) & TRACE_FRAME_MASK_NUM_ARGS; \ if (nested) { \ _frame->_info |= TRACE_FRAME_MASK_NESTED; \ }; \ -- 2.50.1