diff options
author | jvoisin <julien.voisin@dustri.org> | 2019-01-08 22:08:40 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-09 10:01:12 +0100 |
commit | fbdaabba62e8a7068dd0212b79be3607746ff26b (patch) | |
tree | 7846102e9b20cba24c71238a18344ec501e5239d | |
parent | 270e137ff006b32544de4dcd0554cfda50fe428a (diff) | |
download | php-git-fbdaabba62e8a7068dd0212b79be3607746ff26b.tar.gz |
Fix some sign-related issues in comparisons
-rw-r--r-- | Zend/zend_opcode.c | 2 | ||||
-rw-r--r-- | Zend/zend_string.c | 2 | ||||
-rw-r--r-- | ext/hash/hash.c | 6 | ||||
-rw-r--r-- | ext/opcache/zend_file_cache.c | 4 | ||||
-rw-r--r-- | ext/opcache/zend_persist.c | 2 | ||||
-rw-r--r-- | ext/phar/tar.c | 2 | ||||
-rw-r--r-- | ext/reflection/php_reflection.c | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index dbe2b5c20b..6ec0e2d1c8 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -187,7 +187,7 @@ static void _destroy_zend_class_traits_info(zend_class_entry *ce) } if (ce->trait_precedences) { - int j; + uint32_t j; i = 0; while (ce->trait_precedences[i]) { diff --git a/Zend/zend_string.c b/Zend/zend_string.c index c628b9a4c7..b81d5f1a73 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -76,7 +76,7 @@ static void zend_init_interned_strings_ht(HashTable *interned_strings, int perma ZEND_API void zend_interned_strings_init(void) { char s[2]; - int i; + unsigned int i; zend_string *str; interned_string_request_handler = zend_new_interned_string_request; diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 66b39a8a80..d89f12965b 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -195,14 +195,14 @@ PHP_FUNCTION(hash_file) /* }}} */ static inline void php_hash_string_xor_char(unsigned char *out, const unsigned char *in, const unsigned char xor_with, const size_t length) { - int i; + size_t i; for (i=0; i < length; i++) { out[i] = in[i] ^ xor_with; } } static inline void php_hash_string_xor(unsigned char *out, const unsigned char *in, const unsigned char *xor_with, const size_t length) { - int i; + size_t i; for (i=0; i < length; i++) { out[i] = in[i] ^ xor_with[i]; } @@ -614,7 +614,7 @@ PHP_FUNCTION(hash_hkdf) zend_string *returnval, *ikm, *algo, *info = NULL, *salt = NULL; zend_long length = 0; unsigned char *prk, *digest, *K; - int i; + size_t i; size_t rounds; const php_hash_ops *ops; void *context; diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index fddcd5dcd4..86cb8a2e25 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -717,7 +717,7 @@ static void zend_file_cache_serialize_class(zval *zv, if (ce->trait_precedences) { zend_trait_precedence **p, *q; - int j; + uint32_t j; SERIALIZE_PTR(ce->trait_precedences); p = ce->trait_precedences; @@ -1373,7 +1373,7 @@ static void zend_file_cache_unserialize_class(zval *zv, if (ce->trait_precedences) { zend_trait_precedence **p, *q; - int j; + uint32_t j; UNSERIALIZE_PTR(ce->trait_precedences); p = ce->trait_precedences; diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 139c031231..eba9dd23e4 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -896,7 +896,7 @@ static void zend_persist_class_entry(zval *zv) } if (ce->trait_precedences) { - int j; + uint32_t j; i = 0; while (ce->trait_precedences[i]) { diff --git a/ext/phar/tar.c b/ext/phar/tar.c index 5b5b796ffe..bce66f0c3b 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -22,7 +22,7 @@ static uint32_t phar_tar_number(char *buf, size_t len) /* {{{ */ { uint32_t num = 0; - int i = 0; + size_t i = 0; while (i < len && buf[i] == ' ') { ++i; diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 9748594fa5..105a87da8b 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2403,7 +2403,7 @@ ZEND_METHOD(reflection_parameter, __construct) ref = (parameter_reference*) emalloc(sizeof(parameter_reference)); ref->arg_info = &arg_info[position]; ref->offset = (uint32_t)position; - ref->required = position < fptr->common.required_num_args; + ref->required = (uint32_t)position < fptr->common.required_num_args; ref->fptr = fptr; /* TODO: copy fptr */ intern->ptr = ref; |