]> granicus.if.org Git - php/commitdiff
fixed compile warning with Visual C++.
authorRui Hirokawa <hirokawa@php.net>
Tue, 30 Apr 2002 12:45:14 +0000 (12:45 +0000)
committerRui Hirokawa <hirokawa@php.net>
Tue, 30 Apr 2002 12:45:14 +0000 (12:45 +0000)
ext/mbstring/mbfilter.c
ext/mbstring/mbregex.c

index e9dc03f67edabb48a407c1455236c10e8cfd28c2..968ee515ef74c4a99b378c2b66e618ee8cec0932 100644 (file)
@@ -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;
index 63eff678cc593ded29ccc3fc9e08d3fa8fd3f706..7e5673fccbea0e4930be01f6d4096bb0dd73c837 100644 (file)
@@ -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.  */