com php-src: fix signed/unsigned mismatch: ext/standard/array.c
| From: | Anatol Belski | Date: | Tue, 16 Sep 2014 19:17:27 +0000 |
| Subject: | com php-src: fix signed/unsigned mismatch: ext/standard/array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81692@lists.php.net to get a copy of this message | ||
Commit: 8c4ab0d02edd1cd6f353ce9e411cd43f726ed441
Author: Anatol Belski <ab@php.net> Tue, 16 Sep 2014 21:06:22 +0200
Parents: fc6f7bfcf36a313d712bb08b0fae6a1d793c0333
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8c4ab0d02edd1cd6f353ce9e411cd43f726ed441
Log:
fix signed/unsigned mismatch
Changed paths:
M ext/standard/array.c
Diff:
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 09aaddf..a417925 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -1528,7 +1528,7 @@ static void php_compact_var(HashTable *eg_active_symbol_table, zval
*return_valu
PHP_FUNCTION(compact)
{
zval *args = NULL; /* function arguments array */
- int num_args, i;
+ uint32_t num_args, i;
zend_array *symbol_table;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &num_args) ==
FAILURE) {
@@ -2085,7 +2085,7 @@ static void _phpi_pop(INTERNAL_FUNCTION_PARAMETERS, int off_the_end)
zend_hash_rehash(Z_ARRVAL_P(stack));
}
}
- } else if (!key && Z_ARRVAL_P(stack)->nNextFreeElement > 0 && index >=
Z_ARRVAL_P(stack)->nNextFreeElement - 1) {
+ } else if (!key && Z_ARRVAL_P(stack)->nNextFreeElement > 0 && index >=
(zend_ulong)(Z_ARRVAL_P(stack)->nNextFreeElement - 1)) {
Z_ARRVAL_P(stack)->nNextFreeElement = Z_ARRVAL_P(stack)->nNextFreeElement - 1;
}
@@ -3174,7 +3174,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior,
int
int arr_argc, i, c = 0;
uint idx;
Bucket **lists, *list, **ptrs, *p;
- int req_args;
+ uint32_t req_args;
char *param_spec;
zend_fcall_info fci1, fci2;
zend_fcall_info_cache fci1_cache = empty_fcall_info_cache, fci2_cache = empty_fcall_info_cache;
@@ -3598,7 +3598,7 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
data_
int arr_argc, i, c;
uint idx;
Bucket **lists, *list, **ptrs, *p;
- int req_args;
+ uint32_t req_args;
char *param_spec;
zend_fcall_info fci1, fci2;
zend_fcall_info_cache fci1_cache = empty_fcall_info_cache, fci2_cache = empty_fcall_info_cache;
@@ -4423,7 +4423,8 @@ PHP_FUNCTION(array_map)
zval result;
zend_fcall_info fci = empty_fcall_info;
zend_fcall_info_cache fci_cache = empty_fcall_info_cache;
- int i, k, maxlen = 0;
+ int i;
+ uint32_t k, maxlen = 0;
#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!+", &fci, &fci_cache,
&arrays, &n_arrays) == FAILURE) {