]> granicus.if.org Git - php/commitdiff
- MFH: Fix warnings
authorMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 25 Jul 2008 14:04:54 +0000 (14:04 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 25 Jul 2008 14:04:54 +0000 (14:04 +0000)
ext/mbstring/mbstring.c
ext/mbstring/php_mbregex.c

index d1904746ff328638776ec9e00e9377bfa485f786..05dbbcd26a330f41c956c00251cbf3dd04ef1b1a 100644 (file)
@@ -2425,7 +2425,7 @@ PHP_FUNCTION(mb_strripos)
                RETURN_FALSE;
        }
 
-       if (offset > haystack.len) {
+       if ((unsigned int)offset > haystack.len) {
                RETURN_FALSE;
        }
 
@@ -2833,11 +2833,11 @@ PHP_FUNCTION(mb_strcut)
                }
        }
 
-       if (from > string.len) {
+       if ((unsigned int)from > string.len) {
                RETURN_FALSE;
        }
 
-       if (((unsigned) from + (unsigned) len) > string.len) {
+       if (((unsigned int)from + (unsigned int)len) > string.len) {
                len = string.len - from;
        }
 
@@ -3219,7 +3219,7 @@ PHP_FUNCTION(mb_detect_encoding)
        }
 
        if (ZEND_NUM_ARGS() < 3) {
-               strict = MBSTRG(strict_detection);
+               strict = (zend_bool)MBSTRG(strict_detection);
        }
 
        if (size > 0 && list != NULL) {
index f1328cf1dd2875c7ae5a5c31692e62faf393bb68..0e541f6b411ea3bc5ebfabbe79d95828626f1972 100644 (file)
@@ -928,7 +928,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
                                zval_dtor(&v);
                        }
                        n = regs->end[0];
-                       if ((size_t)(pos - (OnigUChar *)string) < n) {
+                       if ((pos - (OnigUChar *)string) < n) {
                                pos = (OnigUChar *)string + n;
                        } else {
                                if (pos < string_lim) {
@@ -1021,7 +1021,7 @@ PHP_FUNCTION(mb_split)
                }
 
                /* add it to the array */
-               if (regs->beg[0] < string_len && regs->beg[0] >= (size_t)(pos - (OnigUChar *)string)) {
+               if (regs->beg[0] < string_len && regs->beg[0] >= (pos - (OnigUChar *)string)) {
                        add_next_index_stringl(return_value, (char *)pos, ((OnigUChar *)(string + regs->beg[0]) - pos), 1);
                } else {
                        err = -2;
@@ -1246,7 +1246,7 @@ PHP_FUNCTION(mb_ereg_search_init)
        char *arg_pattern, *arg_options;
        int arg_pattern_len, arg_options_len;
        OnigSyntaxType *syntax = NULL;
-       int option;
+       OnigOptionType option;
 
        if (zend_parse_parameters(argc TSRMLS_CC, "z|ss", &arg_str, &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
                return;