mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Fixed comilation warnings
This commit is contained in:
parent
c09d8d931f
commit
d90ebc65a6
@ -522,22 +522,21 @@ END_EXTERN_C()
|
||||
Z_TYPE_P(z) = IS_STRING; \
|
||||
}
|
||||
|
||||
#define ZVAL_ZVAL(z, zv, copy, dtor) { \
|
||||
int is_ref, refcount; \
|
||||
is_ref = Z_ISREF_P(z); \
|
||||
refcount = Z_REFCOUNT_P(z); \
|
||||
*(z) = *(zv); \
|
||||
if (copy) { \
|
||||
zval_copy_ctor(z); \
|
||||
} \
|
||||
if (dtor) { \
|
||||
if (!copy) { \
|
||||
ZVAL_NULL(zv); \
|
||||
} \
|
||||
zval_ptr_dtor(&zv); \
|
||||
} \
|
||||
Z_SET_ISREF_TO_P(z, is_ref); \
|
||||
Z_SET_REFCOUNT_P(z, refcount); \
|
||||
#define ZVAL_ZVAL(z, zv, copy, dtor) { \
|
||||
zend_uchar is_ref = Z_ISREF_P(z); \
|
||||
zend_uint refcount = Z_REFCOUNT_P(z); \
|
||||
*(z) = *(zv); \
|
||||
if (copy) { \
|
||||
zval_copy_ctor(z); \
|
||||
} \
|
||||
if (dtor) { \
|
||||
if (!copy) { \
|
||||
ZVAL_NULL(zv); \
|
||||
} \
|
||||
zval_ptr_dtor(&zv); \
|
||||
} \
|
||||
Z_SET_ISREF_TO_P(z, is_ref); \
|
||||
Z_SET_REFCOUNT_P(z, refcount); \
|
||||
}
|
||||
|
||||
#define ZVAL_FALSE(z) ZVAL_BOOL(z, 0)
|
||||
|
@ -1654,7 +1654,7 @@ ZEND_FUNCTION(get_defined_constants)
|
||||
zend_constant *val;
|
||||
int module_number;
|
||||
zval **modules;
|
||||
const char **module_names;
|
||||
char **module_names;
|
||||
zend_module_entry *module;
|
||||
int i = 1;
|
||||
|
||||
@ -1664,7 +1664,7 @@ ZEND_FUNCTION(get_defined_constants)
|
||||
module_names[0] = "internal";
|
||||
zend_hash_internal_pointer_reset_ex(&module_registry, &pos);
|
||||
while (zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) != FAILURE) {
|
||||
module_names[i++] = module->name;
|
||||
module_names[i++] = (char*)module->name;
|
||||
zend_hash_move_forward_ex(&module_registry, &pos);
|
||||
}
|
||||
module_names[i] = "user";
|
||||
|
@ -422,7 +422,7 @@ int zend_user_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len
|
||||
zval_ptr_dtor(&retval);
|
||||
return FAILURE;
|
||||
case IS_STRING:
|
||||
*buffer = estrndup(Z_STRVAL_P(retval), Z_STRLEN_P(retval));
|
||||
*buffer = (unsigned char*)estrndup(Z_STRVAL_P(retval), Z_STRLEN_P(retval));
|
||||
*buf_len = Z_STRLEN_P(retval);
|
||||
result = SUCCESS;
|
||||
break;
|
||||
|
@ -4099,7 +4099,7 @@ ZEND_VM_HANDLER(150, ZEND_USER_OPCODE, ANY, ANY)
|
||||
case ZEND_USER_OPCODE_DISPATCH:
|
||||
ZEND_VM_DISPATCH(EX(opline)->opcode, EX(opline));
|
||||
default:
|
||||
ZEND_VM_DISPATCH(ret & 0xff, EX(opline));
|
||||
ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), EX(opline));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,7 @@ static int ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
case ZEND_USER_OPCODE_DISPATCH:
|
||||
ZEND_VM_DISPATCH(EX(opline)->opcode, EX(opline));
|
||||
default:
|
||||
ZEND_VM_DISPATCH(ret & 0xff, EX(opline));
|
||||
ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), EX(opline));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user