summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-08-17 18:56:54 +0000
committerMarcus Boerger <helly@php.net>2003-08-17 18:56:54 +0000
commit717b5afe1d11fabe0081453abe275f352a0e9b24 (patch)
treeed709a3b28113b72950679876896b474c625116e
parentcbb011da2d1c1428c96418622301ee0499127e57 (diff)
downloadphp-git-717b5afe1d11fabe0081453abe275f352a0e9b24.tar.gz
Fix warnings
-rw-r--r--Zend/zend_API.h4
-rw-r--r--Zend/zend_execute.c16
-rw-r--r--Zend/zend_reflection_api.c3
-rw-r--r--ext/reflection/php_reflection.c3
4 files changed, 8 insertions, 18 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 038c75ed11..8f4567c36a 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -49,8 +49,8 @@ typedef struct _zend_function_entry {
#define ZEND_NAMED_FE(zend_name, name, arg_info) { #zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), 0 },
#define ZEND_FE(name, arg_info) ZEND_NAMED_FE(name, ZEND_FN(name), arg_info)
#define ZEND_FALIAS(name, alias, arg_info) ZEND_NAMED_FE(name, ZEND_FN(alias), arg_info)
-#define ZEND_ME(classname, name, arg_info, flags) { #name, ZEND_FN(classname##_##name), arg_info, sizeof(arg_info)/sizeof(struct _zend_arg_info)-1, flags },
-#define ZEND_ABSTRACT_ME(classname, name, arg_info) { #name, NULL, arg_info, sizeof(arg_info)/sizeof(struct _zend_arg_info)-1, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT },
+#define ZEND_ME(classname, name, arg_info, flags) { #name, ZEND_FN(classname##_##name), arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
+#define ZEND_ABSTRACT_ME(classname, name, arg_info) { #name, NULL, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT },
#define ZEND_ARG_INFO(pass_by_ref, name) { #name, sizeof(#name)-1, NULL, 0, 0, pass_by_ref },
#define ZEND_ARG_PASS_INFO(pass_by_ref) { NULL, 0, NULL, 0, 0, pass_by_ref },
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index f09836d43e..aa6607d35c 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -76,7 +76,7 @@ static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, zval **should_
zval *str = T->EA.data.str_offset.str;
if (T->EA.data.str_offset.str->type != IS_STRING
- || (T->EA.data.str_offset.offset<0)
+ || ((int)T->EA.data.str_offset.offset<0)
|| (T->EA.data.str_offset.str->value.str.len <= T->EA.data.str_offset.offset)) {
zend_error(E_NOTICE, "Uninitialized string offset: %d", T->EA.data.str_offset.offset);
T->tmp_var.value.str.val = empty_string;
@@ -799,10 +799,9 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
if (!container_ptr) {
if (T(op1->u.var).EA.type == IS_STRING_OFFSET) {
- zval *offset;
zend_error(E_WARNING, "Cannot use string offset as an array");
- offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
+ get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
FREE_OP(Ts, op2, EG(free_op2));
}
*retval = &EG(error_zval_ptr);
@@ -908,9 +907,7 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
}
break;
default: {
- zval *offset;
-
- offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
+ get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
if (type==BP_VAR_R || type==BP_VAR_IS) {
*retval = &EG(uninitialized_zval_ptr);
} else {
@@ -971,9 +968,7 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
}
if (container->type != IS_OBJECT) {
- zval *offset;
-
- offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
+ get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
FREE_OP(Ts, op2, EG(free_op2));
if (type == BP_VAR_R || type == BP_VAR_IS) {
*retval = &EG(uninitialized_zval_ptr);
@@ -1721,8 +1716,9 @@ int zend_post_dec_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
NEXT_OPCODE();
}
+typedef int (*incdec_t)(zval *);
-static inline int zend_incdec_op_helper(void *incdec_op_arg, ZEND_OPCODE_HANDLER_ARGS)
+static inline int zend_incdec_op_helper(incdec_t incdec_op_arg, ZEND_OPCODE_HANDLER_ARGS)
{
zval **var_ptr = get_zval_ptr_ptr(&EX(opline)->op1, EX(Ts), BP_VAR_RW);
int (*incdec_op)(zval *op1) = incdec_op_arg;
diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c
index 1277fca145..81d9b4d72b 100644
--- a/Zend/zend_reflection_api.c
+++ b/Zend/zend_reflection_api.c
@@ -753,15 +753,12 @@ ZEND_FUNCTION(reflection_function_invoke)
{
zval *retval_ptr;
zval ***params;
- reflection_object *intern;
- zend_function *fptr;
zval *fname;
int result;
int argc = ZEND_NUM_ARGS();
zend_fcall_info fci;
METHOD_NOTSTATIC;
- GET_REFLECTION_OBJECT_PTR(fptr);
params = safe_emalloc(sizeof(zval **), argc, 0);
if (zend_get_parameters_array_ex(argc, params) == FAILURE) {
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 1277fca145..81d9b4d72b 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -753,15 +753,12 @@ ZEND_FUNCTION(reflection_function_invoke)
{
zval *retval_ptr;
zval ***params;
- reflection_object *intern;
- zend_function *fptr;
zval *fname;
int result;
int argc = ZEND_NUM_ARGS();
zend_fcall_info fci;
METHOD_NOTSTATIC;
- GET_REFLECTION_OBJECT_PTR(fptr);
params = safe_emalloc(sizeof(zval **), argc, 0);
if (zend_get_parameters_array_ex(argc, params) == FAILURE) {