]> granicus.if.org Git - php/commitdiff
Fix -Wtype-limits warning by using correct type declaration in JIT trace
authorGeorge Peter Banyard <girgias@php.net>
Wed, 25 Mar 2020 20:44:03 +0000 (21:44 +0100)
committerGeorge Peter Banyard <girgias@php.net>
Wed, 25 Mar 2020 23:01:59 +0000 (00:01 +0100)
Namely int as that is the type of 'definition'

Closes GH-5299

ext/opcache/jit/zend_jit_trace.c

index 4ce2a6dbad01f9a7ddd116d15127dda1add70311..2386a6bcf27c6ce824760e658b6952e358fdf4e2 100644 (file)
@@ -774,7 +774,7 @@ static int find_call_num_args(zend_jit_trace_rec *p)
 static int is_checked_guard(const zend_ssa *tssa, const zend_op **ssa_opcodes, uint32_t var, uint32_t phi_var)
 {
        if ((tssa->var_info[phi_var].type & MAY_BE_ANY) == MAY_BE_LONG) {
-               uint32_t idx = tssa->vars[var].definition;
+               int idx = tssa->vars[var].definition;
 
                if (idx >= 0) {
                        if (tssa->ops[idx].op1_def == var) {