]> granicus.if.org Git - php/commitdiff
Fix maybe uninit warning
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 20 Jun 2019 08:35:22 +0000 (10:35 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 20 Jun 2019 08:35:22 +0000 (10:35 +0200)
ext/opcache/Optimizer/zend_inference.c

index e032005964e0a5cc54b0b6a29961d95220b3f2a7..e58f8fc53b16d721a01cc2fd7fe6ad8507721ad3 100644 (file)
@@ -627,6 +627,9 @@ static int zend_inference_calc_binary_op_range(
                                op2_min = OP2_MIN_RANGE();
                                op1_max = OP1_MAX_RANGE();
                                op2_max = OP2_MAX_RANGE();
+                               /* Suppress uninit variable warnings, these will only be used if the overflow
+                                * flags are all false. */
+                               t1 = t2 = t3 = t4 = 0;
                                ZEND_SIGNED_MULTIPLY_LONG(op1_min, op2_min, t1, dummy, t1_overflow);
                                ZEND_SIGNED_MULTIPLY_LONG(op1_min, op2_max, t2, dummy, t2_overflow);
                                ZEND_SIGNED_MULTIPLY_LONG(op1_max, op2_min, t3, dummy, t3_overflow);