@@ -92,10 +92,9 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
92
92
{
93
93
php_com_saproxy * proxy = SA_FETCH (object );
94
94
zval * return_value ;
95
- UINT dims ;
95
+ UINT dims , i ;
96
96
SAFEARRAY * sa ;
97
97
LONG ubound , lbound ;
98
- int i ;
99
98
HRESULT res ;
100
99
101
100
MAKE_STD_ZVAL (return_value );
@@ -110,7 +109,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
110
109
111
110
args = safe_emalloc (proxy -> dimensions + 1 , sizeof (zval * ), 0 );
112
111
113
- for (i = 1 ; i < proxy -> dimensions ; i ++ ) {
112
+ for (i = 1 ; i < ( UINT ) proxy -> dimensions ; i ++ ) {
114
113
args [i - 1 ] = proxy -> indices [i ];
115
114
}
116
115
args [i - 1 ] = offset ;
@@ -145,7 +144,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
145
144
sa = V_ARRAY (& proxy -> obj -> v );
146
145
dims = SafeArrayGetDim (sa );
147
146
148
- if (proxy -> dimensions >= dims ) {
147
+ if (( UINT ) proxy -> dimensions >= dims ) {
149
148
/* too many dimensions */
150
149
php_com_throw_exception (E_INVALIDARG , "too many dimensions!" TSRMLS_CC );
151
150
return return_value ;
@@ -212,8 +211,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
212
211
static void saproxy_write_dimension (zval * object , zval * offset , zval * value TSRMLS_DC )
213
212
{
214
213
php_com_saproxy * proxy = SA_FETCH (object );
215
- UINT dims ;
216
- int i ;
214
+ UINT dims , i ;
217
215
HRESULT res ;
218
216
VARIANT v ;
219
217
@@ -223,7 +221,7 @@ static void saproxy_write_dimension(zval *object, zval *offset, zval *value TSRM
223
221
* the final value */
224
222
zval * * args = safe_emalloc (proxy -> dimensions + 2 , sizeof (zval * ), 0 );
225
223
226
- for (i = 1 ; i < proxy -> dimensions ; i ++ ) {
224
+ for (i = 1 ; i < ( UINT ) proxy -> dimensions ; i ++ ) {
227
225
args [i - 1 ] = proxy -> indices [i ];
228
226
}
229
227
args [i - 1 ] = offset ;
@@ -340,12 +338,12 @@ static union _zend_function *saproxy_constructor_get(zval *object TSRMLS_DC)
340
338
return NULL ;
341
339
}
342
340
343
- static zend_class_entry * saproxy_class_entry_get (zval * object TSRMLS_DC )
341
+ static zend_class_entry * saproxy_class_entry_get (const zval * object TSRMLS_DC )
344
342
{
345
343
return php_com_saproxy_class_entry ;
346
344
}
347
345
348
- static int saproxy_class_name_get (zval * object , char * * class_name , zend_uint * class_name_len , int parent TSRMLS_DC )
346
+ static int saproxy_class_name_get (const zval * object , char * * class_name , zend_uint * class_name_len , int parent TSRMLS_DC )
349
347
{
350
348
* class_name = estrndup (php_com_saproxy_class_entry -> name , php_com_saproxy_class_entry -> name_length );
351
349
* class_name_len = php_com_saproxy_class_entry -> name_length ;
0 commit comments