[Pcre-svn] [1067] code/trunk/pcre_compile.c: pcre32: compile…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [1067] code/trunk/pcre_compile.c: pcre32: compile: Fix signed/ unsigned mismatch in find_parens_sub
Revision: 1067
          http://vcs.pcre.org/viewvc?view=rev&revision=1067
Author:   chpe
Date:     2012-10-16 16:54:22 +0100 (Tue, 16 Oct 2012)


Log Message:
-----------
pcre32: compile: Fix signed/unsigned mismatch in find_parens_sub

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


Modified: code/trunk/pcre_compile.c
===================================================================
--- code/trunk/pcre_compile.c    2012-10-16 15:54:19 UTC (rev 1066)
+++ code/trunk/pcre_compile.c    2012-10-16 15:54:22 UTC (rev 1067)
@@ -1457,7 +1457,7 @@
     if ((*ptr == CHAR_LESS_THAN_SIGN && ptr[1] != CHAR_EXCLAMATION_MARK &&
         ptr[1] != CHAR_EQUALS_SIGN) || *ptr == CHAR_APOSTROPHE)
       {
-      int term;
+      pcre_uchar term;
       const pcre_uchar *thisname;
       *count += 1;
       if (name == NULL && *count == lorn) return *count;
@@ -1465,8 +1465,8 @@
       if (term == CHAR_LESS_THAN_SIGN) term = CHAR_GREATER_THAN_SIGN;
       thisname = ptr;
       while (*ptr != term) ptr++;
-      if (name != NULL && lorn == ptr - thisname &&
-          STRNCMP_UC_UC(name, thisname, lorn) == 0)
+      if (name != NULL && lorn == (int)(ptr - thisname) &&
+          STRNCMP_UC_UC(name, thisname, (unsigned int)lorn) == 0)
         return *count;
       term++;
       }