summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_API.c6
-rw-r--r--Zend/zend_ast.c2
-rw-r--r--Zend/zend_compile.c2
-rw-r--r--Zend/zend_constants.c4
-rw-r--r--Zend/zend_execute.h8
-rw-r--r--Zend/zend_execute_API.c15
-rw-r--r--Zend/zend_object_handlers.c2
-rw-r--r--Zend/zend_vm_def.h6
-rw-r--r--Zend/zend_vm_execute.h32
-rw-r--r--ext/opcache/zend_accelerator_module.c2
-rw-r--r--ext/reflection/php_reflection.c6
-rw-r--r--ext/standard/basic_functions.c5
-rw-r--r--sapi/apache2handler/sapi_apache2.c4
-rw-r--r--sapi/cgi/cgi_main.c2
14 files changed, 46 insertions, 50 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 76988601b3..2d845d357e 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1070,7 +1070,7 @@ static int zval_update_class_constant(zval **pp, int is_static, int offset TSRML
int ret;
zend_class_entry *old_scope = *scope;
*scope = prop_info->ce;
- ret = zval_update_constant(pp, (void*)1 TSRMLS_CC);
+ ret = zval_update_constant(pp, 1 TSRMLS_CC);
*scope = old_scope;
return ret;
}
@@ -1079,7 +1079,7 @@ static int zval_update_class_constant(zval **pp, int is_static, int offset TSRML
} while (ce);
}
- return zval_update_constant(pp, (void*)1 TSRMLS_CC);
+ return zval_update_constant(pp, 1 TSRMLS_CC);
}
return 0;
}
@@ -1093,7 +1093,7 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
int i;
*scope = class_type;
- zend_hash_apply_with_argument(&class_type->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC);
+ zend_hash_apply_with_argument(&class_type->constants_table, (apply_func_arg_t) zval_update_constant, (void *)1 TSRMLS_CC);
for (i = 0; i < class_type->default_properties_count; i++) {
if (class_type->default_properties_table[i]) {
diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c
index 633dac18b6..c5eff3467f 100644
--- a/Zend/zend_ast.c
+++ b/Zend/zend_ast.c
@@ -254,7 +254,7 @@ ZEND_API void zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *s
*result = *ast->u.val;
zval_copy_ctor(result);
if (IS_CONSTANT_TYPE(Z_TYPE_P(result))) {
- zval_update_constant_ex(&result, (void *) 1, scope TSRMLS_CC);
+ zval_update_constant_ex(&result, 1, scope TSRMLS_CC);
}
break;
case ZEND_BOOL_AND:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 099120ae83..beb53402ba 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3461,7 +3461,7 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{
*zv = *precv->op2.zv;
zval_copy_ctor(zv);
INIT_PZVAL(zv);
- zval_update_constant_ex(&zv, (void*)1, fptr->common.scope TSRMLS_CC);
+ zval_update_constant_ex(&zv, 1, fptr->common.scope TSRMLS_CC);
if (Z_TYPE_P(zv) == IS_BOOL) {
if (Z_LVAL_P(zv)) {
memcpy(offset, "true", 4);
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index 03762b50d7..0f44f58a77 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -408,7 +408,7 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result,
efree(lcname);
if(found_const) {
*result = c->value;
- zval_update_constant_ex(&result, (void*)1, NULL TSRMLS_CC);
+ zval_update_constant_ex(&result, 1, NULL TSRMLS_CC);
zval_copy_ctor(result);
Z_SET_REFCOUNT_P(result, 1);
Z_UNSET_ISREF_P(result);
@@ -423,7 +423,7 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result,
retval = 0;
finish:
if (retval) {
- zval_update_constant_ex(ret_constant, (void*)1, ce TSRMLS_CC);
+ zval_update_constant_ex(ret_constant, 1, ce TSRMLS_CC);
*result = **ret_constant;
zval_copy_ctor(result);
INIT_PZVAL(result);
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index c09f39d688..d151c3413d 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -156,10 +156,10 @@ static zend_always_inline int i_zend_is_true(zval *op TSRMLS_DC)
return result;
}
-ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC);
-ZEND_API int zval_update_constant_inline_change(zval **pp, void *arg TSRMLS_DC);
-ZEND_API int zval_update_constant_no_inline_change(zval **pp, void *arg TSRMLS_DC);
-ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC);
+ZEND_API int zval_update_constant(zval **pp, zend_bool inline_change TSRMLS_DC);
+ZEND_API int zval_update_constant_inline_change(zval **pp, zend_class_entry *scope TSRMLS_DC);
+ZEND_API int zval_update_constant_no_inline_change(zval **pp, zend_class_entry *scope TSRMLS_DC);
+ZEND_API int zval_update_constant_ex(zval **pp, zend_bool inline_change, zend_class_entry *scope TSRMLS_DC);
/* dedicated Zend executor functions - do not use! */
#define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16)
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 43d1ea17bf..7cfd85d52a 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -456,10 +456,9 @@ ZEND_API int zend_is_true(zval *op TSRMLS_DC) /* {{{ */
#define Z_REAL_TYPE_P(p) (Z_TYPE_P(p) & ~IS_VISITED_CONSTANT)
#define MARK_CONSTANT_VISITED(p) Z_TYPE_P(p) |= IS_VISITED_CONSTANT
-ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC) /* {{{ */
+ZEND_API int zval_update_constant_ex(zval **pp, zend_bool inline_change, zend_class_entry *scope TSRMLS_DC) /* {{{ */
{
zval *p = *pp;
- zend_bool inline_change = (zend_bool) (zend_uintptr_t) arg;
zval const_value;
char *colon;
@@ -560,21 +559,21 @@ ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *sco
}
/* }}} */
-ZEND_API int zval_update_constant_inline_change(zval **pp, void *scope TSRMLS_DC) /* {{{ */
+ZEND_API int zval_update_constant_inline_change(zval **pp, zend_class_entry *scope TSRMLS_DC) /* {{{ */
{
- return zval_update_constant_ex(pp, (void*)1, scope TSRMLS_CC);
+ return zval_update_constant_ex(pp, 1, scope TSRMLS_CC);
}
/* }}} */
-ZEND_API int zval_update_constant_no_inline_change(zval **pp, void *scope TSRMLS_DC) /* {{{ */
+ZEND_API int zval_update_constant_no_inline_change(zval **pp, zend_class_entry *scope TSRMLS_DC) /* {{{ */
{
- return zval_update_constant_ex(pp, (void*)0, scope TSRMLS_CC);
+ return zval_update_constant_ex(pp, 0, scope TSRMLS_CC);
}
/* }}} */
-ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) /* {{{ */
+ZEND_API int zval_update_constant(zval **pp, zend_bool inline_change TSRMLS_DC) /* {{{ */
{
- return zval_update_constant_ex(pp, arg, NULL TSRMLS_CC);
+ return zval_update_constant_ex(pp, inline_change, NULL TSRMLS_CC);
}
/* }}} */
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 805454d70e..7f1d3e4e86 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -170,6 +170,8 @@ ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp TSRMLS_DC
}
zend_error_noreturn(E_ERROR, ZEND_DEBUGINFO_FUNC_NAME "() must return an array");
+
+ return NULL; /* Compilers are dumb and don't understand that noreturn means that the function does NOT need a return value... */
}
/* }}} */
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index b9b30eab8c..195772a395 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -1081,7 +1081,7 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, UNUSED|CONST|
FREE_OP1();
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (OP1_TYPE == IS_VAR && !free_op1.var) {
@@ -3747,7 +3747,7 @@ ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, VAR|CONST|UNUSED, CONST)
zend_class_entry *old_scope = EG(scope);
EG(scope) = ce;
- zval_update_constant(value, (void *) 1 TSRMLS_CC);
+ zval_update_constant(value, 1 TSRMLS_CC);
EG(scope) = old_scope;
}
if (OP1_TYPE == IS_CONST) {
@@ -5376,7 +5376,7 @@ ZEND_VM_HANDLER(143, ZEND_DECLARE_CONST, CONST, CONST)
ZVAL_COPY_VALUE(&tmp, val);
INIT_PZVAL(&tmp);
- zval_update_constant(&tmp_ptr, NULL TSRMLS_CC);
+ zval_update_constant(&tmp_ptr, 0 TSRMLS_CC);
c.value = *tmp_ptr;
} else {
INIT_PZVAL_COPY(&c.value, val);
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 07ffc106fd..4690c3e3ae 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -3684,7 +3684,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_CONST(int type
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_CONST == IS_VAR && !free_op1.var) {
@@ -4008,7 +4008,7 @@ static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCO
zend_class_entry *old_scope = EG(scope);
EG(scope) = ce;
- zval_update_constant(value, (void *) 1 TSRMLS_CC);
+ zval_update_constant(value, 1 TSRMLS_CC);
EG(scope) = old_scope;
}
if (IS_CONST == IS_CONST) {
@@ -4309,7 +4309,7 @@ static int ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCOD
ZVAL_COPY_VALUE(&tmp, val);
INIT_PZVAL(&tmp);
- zval_update_constant(&tmp_ptr, NULL TSRMLS_CC);
+ zval_update_constant(&tmp_ptr, 0 TSRMLS_CC);
c.value = *tmp_ptr;
} else {
INIT_PZVAL_COPY(&c.value, val);
@@ -5568,7 +5568,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_VAR(int type,
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_CONST == IS_VAR && !free_op1.var) {
@@ -6320,7 +6320,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_UNUSED(int typ
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_CONST == IS_VAR && !free_op1.var) {
@@ -9090,7 +9090,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_CONST(int type,
zval_dtor(free_op1.var);
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
@@ -10846,7 +10846,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_VAR(int type, ZE
zval_dtor(free_op1.var);
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
@@ -11600,7 +11600,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_UNUSED(int type,
zval_dtor(free_op1.var);
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
@@ -15020,7 +15020,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR_CONST(int type,
zval_ptr_dtor_nogc(&free_op1.var);
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_VAR == IS_VAR && !free_op1.var) {
@@ -15957,7 +15957,7 @@ static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE
zend_class_entry *old_scope = EG(scope);
EG(scope) = ce;
- zval_update_constant(value, (void *) 1 TSRMLS_CC);
+ zval_update_constant(value, 1 TSRMLS_CC);
EG(scope) = old_scope;
}
if (IS_VAR == IS_CONST) {
@@ -19617,7 +19617,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR_VAR(int type, ZE
zval_ptr_dtor_nogc(&free_op1.var);
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_VAR == IS_VAR && !free_op1.var) {
@@ -21605,7 +21605,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR_UNUSED(int type,
zval_ptr_dtor_nogc(&free_op1.var);
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_VAR == IS_VAR && !free_op1.var) {
@@ -25569,7 +25569,7 @@ static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPC
zend_class_entry *old_scope = EG(scope);
EG(scope) = ce;
- zval_update_constant(value, (void *) 1 TSRMLS_CC);
+ zval_update_constant(value, 1 TSRMLS_CC);
EG(scope) = old_scope;
}
if (IS_UNUSED == IS_CONST) {
@@ -32482,7 +32482,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_CONST(int type, Z
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_CV == IS_VAR && !free_op1.var) {
@@ -36706,7 +36706,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_VAR(int type, ZEN
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_CV == IS_VAR && !free_op1.var) {
@@ -38554,7 +38554,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_UNUSED(int type,
break;
case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ zval_update_constant(retval, 1 TSRMLS_CC);
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (IS_CV == IS_VAR && !free_op1.var) {
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index cf07877516..f4dd9fbb85 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -786,7 +786,7 @@ static ZEND_FUNCTION(opcache_compile_file)
op_array = persistent_compile_file(&handle, ZEND_INCLUDE TSRMLS_CC);
} zend_catch {
EG(current_execute_data) = orig_execute_data;
- zend_error(E_WARNING, ACCELERATOR_PRODUCT_NAME " could not compile file %s" TSRMLS_CC, handle.filename);
+ zend_error(E_WARNING, ACCELERATOR_PRODUCT_NAME " could not compile file %s", handle.filename);
} zend_end_try();
if(op_array != NULL) {
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index a24153dc20..703e14113f 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -733,7 +733,7 @@ static void _parameter_string(string *str, zend_function *fptr, struct _zend_arg
*zv = *precv->op2.zv;
zval_copy_ctor(zv);
INIT_PZVAL(zv);
- zval_update_constant_ex(&zv, (void*)1, fptr->common.scope TSRMLS_CC);
+ zval_update_constant_ex(&zv, 1, fptr->common.scope TSRMLS_CC);
if (Z_TYPE_P(zv) == IS_BOOL) {
if (Z_LVAL_P(zv)) {
string_write(str, "true", sizeof("true")-1);
@@ -2599,7 +2599,7 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
if (!IS_CONSTANT_TYPE(Z_TYPE_P(return_value))) {
zval_copy_ctor(return_value);
}
- zval_update_constant_ex(&return_value, (void*)0, param->fptr->common.scope TSRMLS_CC);
+ zval_update_constant_ex(&return_value, 0, param->fptr->common.scope TSRMLS_CC);
}
/* }}} */
@@ -3411,7 +3411,7 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
/* this is necessary to make it able to work with default array
* properties, returned to user */
if (IS_CONSTANT_TYPE(Z_TYPE_P(prop_copy))) {
- zval_update_constant(&prop_copy, (void *) 1 TSRMLS_CC);
+ zval_update_constant(&prop_copy, 1 TSRMLS_CC);
}
add_assoc_zval(return_value, key, prop_copy);
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index b524760072..853c0bd281 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -945,11 +945,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_scandir, 0, 0, 1)
ZEND_ARG_INFO(0, context)
ZEND_END_ARG_INFO()
/* }}} */
-/* {{{ arginfo ext/standard/dl.c */
-ZEND_BEGIN_ARG_INFO(arginfo_dl, 0)
- ZEND_ARG_INFO(0, extension_filename)
-ZEND_END_ARG_INFO()
-/* }}} */
/* {{{ dns.c */
ZEND_BEGIN_ARG_INFO(arginfo_gethostbyaddr, 0)
ZEND_ARG_INFO(0, ip_address)
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 37d862f889..56faee3c66 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -276,12 +276,12 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
if (!val) {
val = "";
}
- if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), &new_val_len TSRMLS_CC)) {
+ if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (unsigned int *)&new_val_len TSRMLS_CC)) {
php_register_variable_safe(key, val, new_val_len, track_vars_array TSRMLS_CC);
}
APR_ARRAY_FOREACH_CLOSE()
- if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), &new_val_len TSRMLS_CC)) {
+ if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (unsigned int *)&new_val_len TSRMLS_CC)) {
php_register_variable_safe("PHP_SELF", ctx->r->uri, new_val_len, track_vars_array TSRMLS_CC);
}
}
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 5b22fa580f..7006ecd73f 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -1824,7 +1824,7 @@ int main(int argc, char *argv[])
unsigned char *p;
decoded_query_string = strdup(query_string);
php_url_decode(decoded_query_string, strlen(decoded_query_string));
- for (p = decoded_query_string; *p && *p <= ' '; p++) {
+ for (p = (unsigned char *)decoded_query_string; *p && *p <= ' '; p++) {
/* skip all leading spaces */
}
if(*p == '-') {