cvs: php4 /ext/mbstring mbfilter.c mbregex.c

From: Date: Tue, 30 Apr 2002 12:45:14 +0000
Subject: cvs: php4 /ext/mbstring mbfilter.c mbregex.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11558@lists.php.net to get a copy of this message
hirokawa Tue Apr 30 08:45:14 2002 EDT Modified files: /php4/ext/mbstring mbfilter.c mbregex.c Log: fixed compile warning with Visual C++. Index: php4/ext/mbstring/mbfilter.c diff -u php4/ext/mbstring/mbfilter.c:1.23 php4/ext/mbstring/mbfilter.c:1.24 --- php4/ext/mbstring/mbfilter.c:1.23 Tue Apr 30 08:00:41 2002 +++ php4/ext/mbstring/mbfilter.c Tue Apr 30 08:45:14 2002 @@ -79,7 +79,7 @@ * */ -/* $Id: mbfilter.c,v 1.23 2002/04/30 12:00:41 hirokawa Exp $ */ +/* $Id: mbfilter.c,v 1.24 2002/04/30 12:45:14 hirokawa Exp $ */ #ifdef HAVE_CONFIG_H @@ -7017,7 +7017,7 @@ struct collector_strpos_data *pc = (struct collector_strpos_data*)data; if (pc->output >= pc->start) { - if (c == pc->needle.buffer[pc->needle_pos]) { + if (c == (int)pc->needle.buffer[pc->needle_pos]) { if (pc->needle_pos == 0) { pc->found_pos = pc->output; /* found position */ } @@ -7386,7 +7386,7 @@ } /* search end position */ k = start + length; - if (k >= string->len) { + if (k >= (int)string->len) { end = string->len; } else { end = start; Index: php4/ext/mbstring/mbregex.c diff -u php4/ext/mbstring/mbregex.c:1.4 php4/ext/mbstring/mbregex.c:1.5 --- php4/ext/mbstring/mbregex.c:1.4 Sun Apr 7 14:09:31 2002 +++ php4/ext/mbstring/mbregex.c Tue Apr 30 08:45:14 2002 @@ -2202,7 +2202,7 @@ `upper_bound' is 1, though.) */ { /* If the upper bound is > 1, we need to insert more at the end of the loop. */ - unsigned nbytes = upper_bound == 1 ? 10 : 20; + unsigned int nbytes = (unsigned int)upper_bound == 1 ? 10 : 20; GET_BUFFER_SPACE(nbytes); /* Initialize lower bound of the `succeed_n', even @@ -3616,12 +3616,12 @@ regs->end = TMALLOC(num_regs, int); regs->allocated = num_regs; } - else if (regs->allocated < num_regs) { + else if (regs->allocated < (int)num_regs) { TREALLOC(regs->beg, num_regs, int); TREALLOC(regs->end, num_regs, int); regs->allocated = num_regs; } - for (i=0; i<num_regs; i++) { + for (i=0; i<(int)num_regs; i++) { regs->beg[i] = regs->end[i] = -1; } } @@ -3737,7 +3737,7 @@ ( or ( and ) or ) has been seen for. Also set all registers to inactive and mark them as not having matched anything or ever failed. */ - for (mcnt = 0; mcnt < num_regs; mcnt++) { + for (mcnt = 0; mcnt < (int)num_regs; mcnt++) { regstart[mcnt] = regend[mcnt] = old_regstart[mcnt] = old_regend[mcnt] = best_regstart[mcnt] = best_regend[mcnt] = REG_UNSET_VALUE; @@ -3791,7 +3791,7 @@ best_regs_set = 1; best_regend[0] = d; /* Never use regstart[0]. */ - for (mcnt = 1; mcnt < num_regs; mcnt++) { + for (mcnt = 1; mcnt < (int)num_regs; mcnt++) { best_regstart[mcnt] = regstart[mcnt]; best_regend[mcnt] = regend[mcnt]; } @@ -3804,7 +3804,7 @@ /* Restore best match. */ d = best_regend[0]; - for (mcnt = 0; mcnt < num_regs; mcnt++) { + for (mcnt = 0; mcnt < (int)num_regs; mcnt++) { regstart[mcnt] = best_regstart[mcnt]; regend[mcnt] = best_regend[mcnt]; } @@ -3816,7 +3816,7 @@ if (regs) { regs->beg[0] = pos; regs->end[0] = d - string; - for (mcnt = 1; mcnt < num_regs; mcnt++) { + for (mcnt = 1; mcnt < (int)num_regs; mcnt++) { if (REG_UNSET(regend[mcnt])) { regs->beg[mcnt] = -1; regs->end[mcnt] = -1; @@ -4416,7 +4416,7 @@ fail: if (stackp != stackb) { /* A restart point is known. Restart there and pop it. */ - short last_used_reg, this_reg; + long last_used_reg, this_reg; /* If this failure point is from a dummy_failure_point, just skip it. */

« previous php.cvs (#11558) next »