]> granicus.if.org Git - php/commitdiff
Reduced compiler warnings
authorMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 10 Jan 2003 04:44:21 +0000 (04:44 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 10 Jan 2003 04:44:21 +0000 (04:44 +0000)
ext/ereg/ereg.c
ext/standard/reg.c

index 7d9abc911434804da1bf9322e11ce21e414e3ee3..791b215d2fc9ea784a2cb94f1eb85d1838c52141 100644 (file)
@@ -347,7 +347,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha
                        walkbuf = &buf[tmp + subs[0].rm_so];
                        walk = replace;
                        while (*walk)
-                               if ('\\' == *walk && isdigit(walk[1]) && walk[1] - '0' <= re.re_nsub) {
+                               if ('\\' == *walk && isdigit(walk[1]) && walk[1] - '0' <= (int)re.re_nsub) {
                                        if (subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1
                                                /* this next case shouldn't happen. it does. */
                                                && subs[walk[1] - '0'].rm_so <= subs[walk[1] - '0'].rm_eo) {
index 7d9abc911434804da1bf9322e11ce21e414e3ee3..791b215d2fc9ea784a2cb94f1eb85d1838c52141 100644 (file)
@@ -347,7 +347,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha
                        walkbuf = &buf[tmp + subs[0].rm_so];
                        walk = replace;
                        while (*walk)
-                               if ('\\' == *walk && isdigit(walk[1]) && walk[1] - '0' <= re.re_nsub) {
+                               if ('\\' == *walk && isdigit(walk[1]) && walk[1] - '0' <= (int)re.re_nsub) {
                                        if (subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1
                                                /* this next case shouldn't happen. it does. */
                                                && subs[walk[1] - '0'].rm_so <= subs[walk[1] - '0'].rm_eo) {