[Pcre-svn] [718] code/trunk/pcregrep.c: Add some casts to ge…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [718] code/trunk/pcregrep.c: Add some casts to get rid of compiler warnings from MSVC8.
Revision: 718
          http://vcs.pcre.org/viewvc?view=rev&revision=718
Author:   ph10
Date:     2011-10-05 17:11:19 +0100 (Wed, 05 Oct 2011)


Log Message:
-----------
Add some casts to get rid of compiler warnings from MSVC8.

Modified Paths:
--------------
    code/trunk/pcregrep.c


Modified: code/trunk/pcregrep.c
===================================================================
--- code/trunk/pcregrep.c    2011-10-05 15:58:51 UTC (rev 717)
+++ code/trunk/pcregrep.c    2011-10-05 16:11:19 UTC (rev 718)
@@ -1397,7 +1397,7 @@
         for (;;)
           {
           startoffset = offsets[1];
-          if (startoffset >= linelength + endlinelength ||
+          if (startoffset >= (int)linelength + endlinelength ||
               !match_patterns(matchptr, length, startoffset, offsets, &mrc))
             break;
           FWRITE(matchptr + startoffset, 1, offsets[0] - startoffset, stdout);
@@ -1460,7 +1460,7 @@
   /* If input is line buffered, and the buffer is not yet full, read another
   line and add it into the buffer. */


-  if (input_line_buffered && bufflength < bufsize)
+  if (input_line_buffered && bufflength < (size_t)bufsize)
     {
     int add = read_one_line(ptr, bufsize - (ptr - main_buffer), in);
     bufflength += add;
@@ -1472,7 +1472,7 @@
   1/3 and refill it. Before we do this, if some unprinted "after" lines are
   about to be lost, print them. */


-  if (bufflength >= bufsize && ptr > main_buffer + 2*bufthird)
+  if (bufflength >= (size_t)bufsize && ptr > main_buffer + 2*bufthird)
     {
     if (after_context > 0 &&
         lastmatchnumber > 0 &&