]> granicus.if.org Git - php/commitdiff
MFB: fix warning
authorJani Taskinen <jani@php.net>
Thu, 12 Jul 2007 12:12:30 +0000 (12:12 +0000)
committerJani Taskinen <jani@php.net>
Thu, 12 Jul 2007 12:12:30 +0000 (12:12 +0000)
ext/ereg/ereg.c
ext/standard/reg.c

index e54da40d5861c0812110c57d205264950fe79457..f47f8d48af6dd36ff60ab9a7ee2ab900182f99d9 100644 (file)
@@ -355,7 +355,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha
                        new_l = strlen(buf) + subs[0].rm_so; /* part before the match */
                        walk = replace;
                        while (*walk) {
-                               if ('\\' == *walk && isdigit((unsigned char)walk[1]) && ((unsigned char)walk[1]) - '0' <= re.re_nsub) {
+                               if ('\\' == *walk && isdigit((unsigned char)walk[1]) && ((unsigned char)walk[1]) - '0' <= (int)re.re_nsub) {
                                        if (subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1) {
                                                new_l += subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so;
                                        }    
index e54da40d5861c0812110c57d205264950fe79457..f47f8d48af6dd36ff60ab9a7ee2ab900182f99d9 100644 (file)
@@ -355,7 +355,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha
                        new_l = strlen(buf) + subs[0].rm_so; /* part before the match */
                        walk = replace;
                        while (*walk) {
-                               if ('\\' == *walk && isdigit((unsigned char)walk[1]) && ((unsigned char)walk[1]) - '0' <= re.re_nsub) {
+                               if ('\\' == *walk && isdigit((unsigned char)walk[1]) && ((unsigned char)walk[1]) - '0' <= (int)re.re_nsub) {
                                        if (subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1) {
                                                new_l += subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so;
                                        }