mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Fix some sign-related issues in comparisons
This commit is contained in:
parent
270e137ff0
commit
fbdaabba62
@ -187,7 +187,7 @@ static void _destroy_zend_class_traits_info(zend_class_entry *ce)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ce->trait_precedences) {
|
if (ce->trait_precedences) {
|
||||||
int j;
|
uint32_t j;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (ce->trait_precedences[i]) {
|
while (ce->trait_precedences[i]) {
|
||||||
|
@ -76,7 +76,7 @@ static void zend_init_interned_strings_ht(HashTable *interned_strings, int perma
|
|||||||
ZEND_API void zend_interned_strings_init(void)
|
ZEND_API void zend_interned_strings_init(void)
|
||||||
{
|
{
|
||||||
char s[2];
|
char s[2];
|
||||||
int i;
|
unsigned int i;
|
||||||
zend_string *str;
|
zend_string *str;
|
||||||
|
|
||||||
interned_string_request_handler = zend_new_interned_string_request;
|
interned_string_request_handler = zend_new_interned_string_request;
|
||||||
|
@ -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) {
|
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++) {
|
for (i=0; i < length; i++) {
|
||||||
out[i] = in[i] ^ xor_with;
|
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) {
|
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++) {
|
for (i=0; i < length; i++) {
|
||||||
out[i] = in[i] ^ xor_with[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_string *returnval, *ikm, *algo, *info = NULL, *salt = NULL;
|
||||||
zend_long length = 0;
|
zend_long length = 0;
|
||||||
unsigned char *prk, *digest, *K;
|
unsigned char *prk, *digest, *K;
|
||||||
int i;
|
size_t i;
|
||||||
size_t rounds;
|
size_t rounds;
|
||||||
const php_hash_ops *ops;
|
const php_hash_ops *ops;
|
||||||
void *context;
|
void *context;
|
||||||
|
@ -717,7 +717,7 @@ static void zend_file_cache_serialize_class(zval *zv,
|
|||||||
|
|
||||||
if (ce->trait_precedences) {
|
if (ce->trait_precedences) {
|
||||||
zend_trait_precedence **p, *q;
|
zend_trait_precedence **p, *q;
|
||||||
int j;
|
uint32_t j;
|
||||||
|
|
||||||
SERIALIZE_PTR(ce->trait_precedences);
|
SERIALIZE_PTR(ce->trait_precedences);
|
||||||
p = ce->trait_precedences;
|
p = ce->trait_precedences;
|
||||||
@ -1373,7 +1373,7 @@ static void zend_file_cache_unserialize_class(zval *zv,
|
|||||||
|
|
||||||
if (ce->trait_precedences) {
|
if (ce->trait_precedences) {
|
||||||
zend_trait_precedence **p, *q;
|
zend_trait_precedence **p, *q;
|
||||||
int j;
|
uint32_t j;
|
||||||
|
|
||||||
UNSERIALIZE_PTR(ce->trait_precedences);
|
UNSERIALIZE_PTR(ce->trait_precedences);
|
||||||
p = ce->trait_precedences;
|
p = ce->trait_precedences;
|
||||||
|
@ -896,7 +896,7 @@ static void zend_persist_class_entry(zval *zv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ce->trait_precedences) {
|
if (ce->trait_precedences) {
|
||||||
int j;
|
uint32_t j;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (ce->trait_precedences[i]) {
|
while (ce->trait_precedences[i]) {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
static uint32_t phar_tar_number(char *buf, size_t len) /* {{{ */
|
static uint32_t phar_tar_number(char *buf, size_t len) /* {{{ */
|
||||||
{
|
{
|
||||||
uint32_t num = 0;
|
uint32_t num = 0;
|
||||||
int i = 0;
|
size_t i = 0;
|
||||||
|
|
||||||
while (i < len && buf[i] == ' ') {
|
while (i < len && buf[i] == ' ') {
|
||||||
++i;
|
++i;
|
||||||
|
@ -2403,7 +2403,7 @@ ZEND_METHOD(reflection_parameter, __construct)
|
|||||||
ref = (parameter_reference*) emalloc(sizeof(parameter_reference));
|
ref = (parameter_reference*) emalloc(sizeof(parameter_reference));
|
||||||
ref->arg_info = &arg_info[position];
|
ref->arg_info = &arg_info[position];
|
||||||
ref->offset = (uint32_t)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;
|
ref->fptr = fptr;
|
||||||
/* TODO: copy fptr */
|
/* TODO: copy fptr */
|
||||||
intern->ptr = ref;
|
intern->ptr = ref;
|
||||||
|
Loading…
Reference in New Issue
Block a user