summaryrefslogtreecommitdiff
path: root/ext/mbstring
diff options
context:
space:
mode:
authorRui Hirokawa <hirokawa@php.net>2002-04-30 12:45:14 +0000
committerRui Hirokawa <hirokawa@php.net>2002-04-30 12:45:14 +0000
commit813a795c642d5d1cac2c35c3b0e48de313cc0b37 (patch)
treeefdce96931ca259445b03ad816cf7338d7bbf2d8 /ext/mbstring
parent5df01432c747980d115e77f51e9e250f0761c9e2 (diff)
downloadphp-git-813a795c642d5d1cac2c35c3b0e48de313cc0b37.tar.gz
fixed compile warning with Visual C++.
Diffstat (limited to 'ext/mbstring')
-rw-r--r--ext/mbstring/mbfilter.c4
-rw-r--r--ext/mbstring/mbregex.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/ext/mbstring/mbfilter.c b/ext/mbstring/mbfilter.c
index e9dc03f67e..968ee515ef 100644
--- a/ext/mbstring/mbfilter.c
+++ b/ext/mbstring/mbfilter.c
@@ -7017,7 +7017,7 @@ collector_strpos(int c, void* data TSRMLS_DC)
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 @@ mbfl_strcut(
}
/* search end position */
k = start + length;
- if (k >= string->len) {
+ if (k >= (int)string->len) {
end = string->len;
} else {
end = start;
diff --git a/ext/mbstring/mbregex.c b/ext/mbstring/mbregex.c
index 63eff678cc..7e5673fccb 100644
--- a/ext/mbstring/mbregex.c
+++ b/ext/mbstring/mbregex.c
@@ -2202,7 +2202,7 @@ re_compile_pattern(pattern, size, bufp)
`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 @@ init_regs(regs, num_regs)
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 @@ re_match(bufp, string_arg, size, pos, regs)
( 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 @@ re_match(bufp, string_arg, size, pos, regs)
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 @@ re_match(bufp, string_arg, size, pos, regs)
/* 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 @@ re_match(bufp, string_arg, size, pos, regs)
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 @@ re_match(bufp, string_arg, size, pos, regs)
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. */