mirror of
https://github.com/php/php-src.git
synced 2025-01-18 09:43:36 +08:00
MFH: Fix compiler warnings
This commit is contained in:
parent
70fb8c85f1
commit
ff88b45ffc
@ -434,7 +434,7 @@ static union _zend_function *com_constructor_get(zval *object TSRMLS_DC)
|
||||
}
|
||||
}
|
||||
|
||||
static zend_class_entry *com_class_entry_get(zval *object TSRMLS_DC)
|
||||
static zend_class_entry *com_class_entry_get(const zval *object TSRMLS_DC)
|
||||
{
|
||||
php_com_dotnet_object *obj;
|
||||
obj = CDNO_FETCH(object);
|
||||
@ -442,7 +442,7 @@ static zend_class_entry *com_class_entry_get(zval *object TSRMLS_DC)
|
||||
return obj->ce;
|
||||
}
|
||||
|
||||
static int com_class_name_get(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC)
|
||||
static int com_class_name_get(const zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC)
|
||||
{
|
||||
php_com_dotnet_object *obj;
|
||||
obj = CDNO_FETCH(object);
|
||||
|
@ -111,7 +111,7 @@ static int com_iter_move_forwards(zend_object_iterator *iter TSRMLS_DC)
|
||||
}
|
||||
} else {
|
||||
/* safe array */
|
||||
if (I->key >= I->sa_max) {
|
||||
if (I->key >= (ULONG) I->sa_max) {
|
||||
I->key = (ulong)-1;
|
||||
return FAILURE;
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ static HRESULT STDMETHODCALLTYPE stm_seek(IStream *This, LARGE_INTEGER dlibMove,
|
||||
return STG_E_INVALIDFUNCTION;
|
||||
}
|
||||
|
||||
offset = dlibMove.QuadPart;
|
||||
offset = (off_t) dlibMove.QuadPart;
|
||||
|
||||
ret = php_stream_seek(stm->stream, offset, whence);
|
||||
|
||||
|
@ -92,10 +92,9 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
|
||||
{
|
||||
php_com_saproxy *proxy = SA_FETCH(object);
|
||||
zval *return_value;
|
||||
UINT dims;
|
||||
UINT dims, i;
|
||||
SAFEARRAY *sa;
|
||||
LONG ubound, lbound;
|
||||
int i;
|
||||
HRESULT res;
|
||||
|
||||
MAKE_STD_ZVAL(return_value);
|
||||
@ -110,7 +109,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
|
||||
|
||||
args = safe_emalloc(proxy->dimensions + 1, sizeof(zval *), 0);
|
||||
|
||||
for (i = 1; i < proxy->dimensions; i++) {
|
||||
for (i = 1; i < (UINT) proxy->dimensions; i++) {
|
||||
args[i-1] = proxy->indices[i];
|
||||
}
|
||||
args[i-1] = offset;
|
||||
@ -145,7 +144,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
|
||||
sa = V_ARRAY(&proxy->obj->v);
|
||||
dims = SafeArrayGetDim(sa);
|
||||
|
||||
if (proxy->dimensions >= dims) {
|
||||
if ((UINT) proxy->dimensions >= dims) {
|
||||
/* too many dimensions */
|
||||
php_com_throw_exception(E_INVALIDARG, "too many dimensions!" TSRMLS_CC);
|
||||
return return_value;
|
||||
@ -212,8 +211,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
|
||||
static void saproxy_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC)
|
||||
{
|
||||
php_com_saproxy *proxy = SA_FETCH(object);
|
||||
UINT dims;
|
||||
int i;
|
||||
UINT dims, i;
|
||||
HRESULT res;
|
||||
VARIANT v;
|
||||
|
||||
@ -223,7 +221,7 @@ static void saproxy_write_dimension(zval *object, zval *offset, zval *value TSRM
|
||||
* the final value */
|
||||
zval **args = safe_emalloc(proxy->dimensions + 2, sizeof(zval *), 0);
|
||||
|
||||
for (i = 1; i < proxy->dimensions; i++) {
|
||||
for (i = 1; i < (UINT) proxy->dimensions; i++) {
|
||||
args[i-1] = proxy->indices[i];
|
||||
}
|
||||
args[i-1] = offset;
|
||||
@ -340,12 +338,12 @@ static union _zend_function *saproxy_constructor_get(zval *object TSRMLS_DC)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static zend_class_entry *saproxy_class_entry_get(zval *object TSRMLS_DC)
|
||||
static zend_class_entry *saproxy_class_entry_get(const zval *object TSRMLS_DC)
|
||||
{
|
||||
return php_com_saproxy_class_entry;
|
||||
}
|
||||
|
||||
static int saproxy_class_name_get(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC)
|
||||
static int saproxy_class_name_get(const zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC)
|
||||
{
|
||||
*class_name = estrndup(php_com_saproxy_class_entry->name, php_com_saproxy_class_entry->name_length);
|
||||
*class_name_len = php_com_saproxy_class_entry->name_length;
|
||||
|
Loading…
Reference in New Issue
Block a user