cvs: ZendEngine2 / zend_API.h zend_execute.c zend_reflection_api.c
| From: | Marcus Boerger | Date: | Sun, 17 Aug 2003 18:56:54 +0000 |
| Subject: | cvs: ZendEngine2 / zend_API.h zend_execute.c zend_reflection_api.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1643@lists.php.net to get a copy of this message | ||
helly Sun Aug 17 14:56:54 2003 EDT
Modified files:
/ZendEngine2 zend_API.h zend_execute.c zend_reflection_api.c
Log:
Fix warnings
Index: ZendEngine2/zend_API.h
diff -u ZendEngine2/zend_API.h:1.152 ZendEngine2/zend_API.h:1.153
--- ZendEngine2/zend_API.h:1.152 Sun Aug 17 09:45:51 2003
+++ ZendEngine2/zend_API.h Sun Aug 17 14:56:53 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.h,v 1.152 2003/08/17 13:45:51 sas Exp $ */
+/* $Id: zend_API.h,v 1.153 2003/08/17 18:56:53 helly Exp $ */
#ifndef ZEND_API_H
#define ZEND_API_H
@@ -49,8 +49,8 @@
#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: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.523 ZendEngine2/zend_execute.c:1.524
--- ZendEngine2/zend_execute.c:1.523 Sun Aug 17 08:38:27 2003
+++ ZendEngine2/zend_execute.c Sun Aug 17 14:56:53 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.523 2003/08/17 12:38:27 helly Exp $ */
+/* $Id: zend_execute.c,v 1.524 2003/08/17 18:56:53 helly Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -76,7 +76,7 @@
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 @@
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 @@
}
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 @@
}
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 @@
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: ZendEngine2/zend_reflection_api.c
diff -u ZendEngine2/zend_reflection_api.c:1.23 ZendEngine2/zend_reflection_api.c:1.24
--- ZendEngine2/zend_reflection_api.c:1.23 Sat Aug 16 16:46:22 2003
+++ ZendEngine2/zend_reflection_api.c Sun Aug 17 14:56:54 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_reflection_api.c,v 1.23 2003/08/16 20:46:22 helly Exp $ */
+/* $Id: zend_reflection_api.c,v 1.24 2003/08/17 18:56:54 helly Exp $ */
#include "zend.h"
#include "zend_API.h"
#include "zend_default_classes.h"
@@ -753,15 +753,12 @@
{
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) {