]> granicus.if.org Git - php/commitdiff
Fix warnings
authorMarcus Boerger <helly@php.net>
Sun, 17 Aug 2003 18:56:54 +0000 (18:56 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 17 Aug 2003 18:56:54 +0000 (18:56 +0000)
Zend/zend_API.h
Zend/zend_execute.c
Zend/zend_reflection_api.c
ext/reflection/php_reflection.c

index 038c75ed116aa5ab3a782e2a79bf6fb6bdba3f17..8f4567c36aaeed83ff009416b19bfd7d77ce1b1a 100644 (file)
@@ -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 },
index f09836d43e7c538ba5d77d251fdf0ddad56bc845..aa6607d35c21514c5e331aa300962fd0254e8b40 100644 (file)
@@ -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;
index 1277fca14588b9847de7a3022685b6c550652edb..81d9b4d72b1d34c61ad04d38297c371049683544 100644 (file)
@@ -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) {
index 1277fca14588b9847de7a3022685b6c550652edb..81d9b4d72b1d34c61ad04d38297c371049683544 100644 (file)
@@ -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) {