diff options
author | Anatol Belski <ab@php.net> | 2014-09-15 21:10:18 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-09-16 21:17:16 +0200 |
commit | fba6e5a8cb3dd9de4478d3f2098520402e868073 (patch) | |
tree | 4f94f2dc84f53eb854832265f35d88ab3be9546f /ext/mbstring/php_mbregex.c | |
parent | 8240255e37671f8c6895c17a99baab7037a1563b (diff) | |
download | php-git-fba6e5a8cb3dd9de4478d3f2098520402e868073.tar.gz |
fix signed/unsigned mismatch warnings
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r-- | ext/mbstring/php_mbregex.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 9628ee2526..d78131fff5 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -1081,7 +1081,7 @@ PHP_FUNCTION(mb_split) err = 0; regs = onig_region_new(); /* churn through str, generating array entries as we go */ - while (count != 0 && (pos - (OnigUChar *)string) < string_len) { + while (count != 0 && (pos - (OnigUChar *)string) < (ptrdiff_t)string_len) { int beg, end; err = onig_search(re, (OnigUChar *)string, (OnigUChar *)(string + string_len), pos, (OnigUChar *)(string + string_len), regs, 0); if (err < 0) { @@ -1403,7 +1403,7 @@ PHP_FUNCTION(mb_ereg_search_setpos) return; } - if (position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && position >= Z_STRLEN(MBREX(search_str)))) { + if (position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && position >= (zend_long)Z_STRLEN(MBREX(search_str)))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Position is out of range"); MBREX(search_pos) = 0; RETURN_FALSE; |