mirror of
https://github.com/php/php-src.git
synced 2026-03-29 03:32:20 +02:00
fix most of signed/unsigned warnings in vm def
This commit is contained in:
@@ -3180,7 +3180,7 @@ ZEND_VM_C_LABEL(send_again):
|
||||
zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht) TSRMLS_CC);
|
||||
|
||||
if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
|
||||
int i;
|
||||
uint32_t i;
|
||||
int separate = 0;
|
||||
|
||||
/* check if any of arguments are going to be passed by reference */
|
||||
@@ -4156,9 +4156,9 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, strlen(resolved_path));
|
||||
failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, (int)strlen(resolved_path));
|
||||
} else {
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
@@ -4171,7 +4171,7 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path))) {
|
||||
if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, (int)strlen(file_handle.opened_path))) {
|
||||
new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
} else {
|
||||
@@ -4707,7 +4707,7 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
|
||||
const char *class_name, *prop_name;
|
||||
int prop_name_len;
|
||||
zend_unmangle_property_name_ex(
|
||||
str_key->val, str_key->len, &class_name, &prop_name, &prop_name_len
|
||||
str_key->val, (int)str_key->len, &class_name, &prop_name, &prop_name_len
|
||||
);
|
||||
ZVAL_STRINGL(key, prop_name, prop_name_len);
|
||||
}
|
||||
@@ -4960,7 +4960,7 @@ ZEND_VM_C_LABEL(num_index_prop):
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
|
||||
@@ -736,7 +736,7 @@ send_again:
|
||||
zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht) TSRMLS_CC);
|
||||
|
||||
if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
|
||||
int i;
|
||||
uint32_t i;
|
||||
int separate = 0;
|
||||
|
||||
/* check if any of arguments are going to be passed by reference */
|
||||
@@ -2960,9 +2960,9 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, strlen(resolved_path));
|
||||
failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, (int)strlen(resolved_path));
|
||||
} else {
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
@@ -2975,7 +2975,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path))) {
|
||||
if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, (int)strlen(file_handle.opened_path))) {
|
||||
new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
} else {
|
||||
@@ -4681,7 +4681,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -5742,7 +5742,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -7077,7 +7077,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -8886,7 +8886,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -9680,9 +9680,9 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, strlen(resolved_path));
|
||||
failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, (int)strlen(resolved_path));
|
||||
} else {
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
@@ -9695,7 +9695,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path))) {
|
||||
if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, (int)strlen(file_handle.opened_path))) {
|
||||
new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
} else {
|
||||
@@ -11274,7 +11274,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -12259,7 +12259,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -13551,7 +13551,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -15122,7 +15122,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -16314,9 +16314,9 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, strlen(resolved_path));
|
||||
failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, (int)strlen(resolved_path));
|
||||
} else {
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
@@ -16329,7 +16329,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path))) {
|
||||
if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, (int)strlen(file_handle.opened_path))) {
|
||||
new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
} else {
|
||||
@@ -16663,7 +16663,7 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
|
||||
const char *class_name, *prop_name;
|
||||
int prop_name_len;
|
||||
zend_unmangle_property_name_ex(
|
||||
str_key->val, str_key->len, &class_name, &prop_name, &prop_name_len
|
||||
str_key->val, (int)str_key->len, &class_name, &prop_name, &prop_name_len
|
||||
);
|
||||
ZVAL_STRINGL(key, prop_name, prop_name_len);
|
||||
}
|
||||
@@ -19110,7 +19110,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -21092,7 +21092,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -23445,7 +23445,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -26671,7 +26671,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -28137,7 +28137,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -29422,7 +29422,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -30709,7 +30709,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -32505,7 +32505,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -33651,9 +33651,9 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, strlen(resolved_path));
|
||||
failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, (int)strlen(resolved_path));
|
||||
} else {
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
@@ -33666,7 +33666,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path))) {
|
||||
if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, (int)strlen(file_handle.opened_path))) {
|
||||
new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
} else {
|
||||
@@ -36083,7 +36083,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -37976,7 +37976,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -40209,7 +40209,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
@@ -43179,7 +43179,7 @@ num_index_prop:
|
||||
}
|
||||
}
|
||||
if (Z_TYPE_P(offset) == IS_LONG) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
|
||||
if (offset->value.lval >= 0 && offset->value.lval < (zend_long)Z_STRLEN_P(container)) {
|
||||
if ((opline->extended_value & ZEND_ISSET) ||
|
||||
Z_STRVAL_P(container)[offset->value.lval] != '0') {
|
||||
result = 1;
|
||||
|
||||
Reference in New Issue
Block a user