1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 07:02:33 +02:00

Fixed signed/unsigned comparison warnings

This commit is contained in:
Dmitry Stogov
2013-02-18 13:03:29 +04:00
parent e708dce674
commit f18678bbcf
3 changed files with 8 additions and 8 deletions

View File

@@ -1182,7 +1182,7 @@ static void assemble_code_blocks(zend_code_block *blocks, zend_op_array *op_arra
#if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
/* adjust early binding list */
if (op_array->early_binding != -1) {
if (op_array->early_binding != (zend_uint)-1) {
zend_uint *opline_num = &op_array->early_binding;
zend_op *end;

View File

@@ -92,10 +92,10 @@ static void nop_removal(zend_op_array *op_array)
}
/* update brk/cont array */
for (i=0; i<op_array->last_brk_cont; i++) {
op_array->brk_cont_array[i].brk -= shiftlist[op_array->brk_cont_array[i].brk];
op_array->brk_cont_array[i].cont -= shiftlist[op_array->brk_cont_array[i].cont];
op_array->brk_cont_array[i].start -= shiftlist[op_array->brk_cont_array[i].start];
for (j=0; j<op_array->last_brk_cont; j++) {
op_array->brk_cont_array[j].brk -= shiftlist[op_array->brk_cont_array[j].brk];
op_array->brk_cont_array[j].cont -= shiftlist[op_array->brk_cont_array[j].cont];
op_array->brk_cont_array[j].start -= shiftlist[op_array->brk_cont_array[j].start];
}
/* update try/catch array */
@@ -112,13 +112,13 @@ static void nop_removal(zend_op_array *op_array)
#if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
/* update early binding list */
if (op_array->early_binding != -1) {
if (op_array->early_binding != (zend_uint)-1) {
zend_uint *opline_num = &op_array->early_binding;
do {
*opline_num -= shiftlist[*opline_num];
opline_num = &ZEND_RESULT(&op_array->opcodes[*opline_num]).opline_num;
} while (*opline_num != -1);
} while (*opline_num != (zend_uint)-1);
}
#endif
}

View File

@@ -25,7 +25,7 @@
#include "ZendAccelerator.h"
#if ZEND_EXTENSION_API_NO > PHP_5_4_X_API_NO
# define VAR_NUM(v) (EX_TMP_VAR_NUM(0, 0) - EX_TMP_VAR(0, v))
# define VAR_NUM(v) ((zend_uint)(EX_TMP_VAR_NUM(0, 0) - EX_TMP_VAR(0, v)))
# define NUM_VAR(v) ((zend_uint)EX_TMP_VAR_NUM(0, v))
#else
# define VAR_NUM(v) ((v)/(sizeof(temp_variable)))