com php-src: fix signed/unsigned mismatch warnings: ext/mbstring/php_mbregex.c

From: Date: Tue, 16 Sep 2014 19:17:16 +0000
Subject: com php-src: fix signed/unsigned mismatch warnings: ext/mbstring/php_mbregex.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81697@lists.php.net to get a copy of this message
Commit: fba6e5a8cb3dd9de4478d3f2098520402e868073 Author: Anatol Belski <ab@php.net> Mon, 15 Sep 2014 21:10:18 +0200 Parents: 8240255e37671f8c6895c17a99baab7037a1563b Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fba6e5a8cb3dd9de4478d3f2098520402e868073 Log: fix signed/unsigned mismatch warnings Changed paths: M ext/mbstring/php_mbregex.c Diff: diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 9628ee2..d78131f 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;

« previous php.cvs (#81697) next »