Fixed annoying warnings

This commit is contained in:
Xinchen Hui 2015-01-29 11:59:37 +08:00
parent e727d640f7
commit a1d9ceac7a
2 changed files with 13 additions and 4 deletions

View file

@ -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 */

View file

@ -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;