com php-src: Fixed annoying warnings: Zend/zend_inheritance .c ext/opcache/Optimizer/zend_optimizer_internal.h
| From: | Xinchen Hui | Date: | Thu, 29 Jan 2015 03:59:37 +0000 |
| Subject: | com php-src: Fixed annoying warnings: Zend/zend_inheritance .c ext/opcache/Optimizer/zend_optimizer_internal.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84435@lists.php.net to get a copy of this message | ||
Commit: a1d9ceac7adb411e2b54ad8bd993c28261d5ae85
Author: Xinchen Hui <laruence@php.net> Thu, 29 Jan 2015 11:59:37 +0800
Parents: e727d640f70aa7092c7274343d02873eb174ef1b
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a1d9ceac7adb411e2b54ad8bd993c28261d5ae85
Log:
Fixed annoying warnings
Changed paths:
M Zend/zend_inheritance.c
M ext/opcache/Optimizer/zend_optimizer_internal.h
Diff:
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index ab188f2..d02e1ab 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -212,7 +212,7 @@ static zend_function *do_inherit_method(zend_function *old_function, zend_class_
}
/* }}} */
-static int zend_do_perform_type_hint_check(zend_function *fe, zend_arg_info *fe_arg_info,
zend_function *proto, zend_arg_info *proto_arg_info) /* {{{ */
+static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_info *fe_arg_info,
const zend_function *proto, zend_arg_info *proto_arg_info) /* {{{ */
{
if (ZEND_LOG_XOR(fe_arg_info->class_name, proto_arg_info->class_name)) {
/* Only one has a type hint and the other one doesn't */
diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h
b/ext/opcache/Optimizer/zend_optimizer_internal.h
index cff6b7f..2bdffca 100644
--- a/ext/opcache/Optimizer/zend_optimizer_internal.h
+++ b/ext/opcache/Optimizer/zend_optimizer_internal.h
@@ -32,10 +32,19 @@
#define INV_COND_EX(op) ((op) == ZEND_JMPZ ? ZEND_JMPNZ_EX : ZEND_JMPZ_EX)
#define INV_EX_COND_EX(op) ((op) == ZEND_JMPZ_EX ? ZEND_JMPNZ_EX : ZEND_JMPZ_EX)
-#define MAKE_NOP(opline) { (opline)->opcode = ZEND_NOP; memset(&(opline)->result, 0,
sizeof((opline)->result)); memset(&(opline)->op1, 0, sizeof((opline)->op1));
memset(&(opline)->op2, 0,
sizeof((opline)->op2));(opline)->result_type=(opline)->op1_type=(opline)->op2_type=IS_UNUSED;
(opline)->handler = zend_opcode_handlers[ZEND_NOP]; }
-#define RESULT_USED(op) (((op->result_type & IS_VAR) && !(op->result_type &
EXT_TYPE_UNUSED)) || op->result_type == IS_TMP_VAR)
+#undef MAKE_NOP
+
+#define MAKE_NOP(opline) do { \
+ (opline)->opcode = ZEND_NOP; \
+ memset(&(opline)->result, 0, sizeof((opline)->result)); \
+ memset(&(opline)->op1, 0, sizeof((opline)->op1)); \
+ memset(&(opline)->op2, 0, sizeof((opline)->op2)); \
+ (opline)->result_type = (opline)->op1_type = (opline)->op2_type=IS_UNUSED; \
+ (opline)->handler = zend_opcode_handlers[ZEND_NOP]; \
+} while (0);
+#define RESULT_USED(op) (((op->result_type & IS_VAR) && !(op->result_type
& EXT_TYPE_UNUSED)) || op->result_type == IS_TMP_VAR)
#define RESULT_UNUSED(op) ((op->result_type & EXT_TYPE_UNUSED) != 0)
-#define SAME_VAR(op1, op2) ((((op1 ## _type & IS_VAR) && (op2 ## _type & IS_VAR))
|| (op1 ## _type == IS_TMP_VAR && op2 ## _type == IS_TMP_VAR)) && op1.var ==
op2.var)
+#define SAME_VAR(op1, op2) ((((op1 ## _type & IS_VAR) && (op2 ## _type & IS_VAR))
|| (op1 ## _type == IS_TMP_VAR && op2 ## _type == IS_TMP_VAR)) && op1.var ==
op2.var)
typedef struct _zend_optimizer_ctx {
zend_arena *arena;