[Pcre-svn] [1131] code/trunk/pcre_compile.c: pcre32: Fix sig…

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1131] code/trunk/pcre_compile.c: pcre32: Fix signed-unsigned compare
Revision: 1131
          http://vcs.pcre.org/viewvc?view=rev&revision=1131
Author:   chpe
Date:     2012-10-18 19:35:18 +0100 (Thu, 18 Oct 2012)


Log Message:
-----------
pcre32: Fix signed-unsigned compare

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


Modified: code/trunk/pcre_compile.c
===================================================================
--- code/trunk/pcre_compile.c    2012-10-18 18:35:15 UTC (rev 1130)
+++ code/trunk/pcre_compile.c    2012-10-18 18:35:18 UTC (rev 1131)
@@ -2918,7 +2918,7 @@
   pcre_uint32 *odptr)
 {
 pcre_uint32 c, othercase, next;
-int co;
+unsigned int co;


 /* Find the first character that has an other case. If it has multiple other 
 cases, return its case offset value. */
@@ -2929,7 +2929,7 @@
     {
     *ocptr = c++;   /* Character that has the set */
     *cptr = c;      /* Rest of input range */
-    return co;
+    return (int)co;
     }    
   if ((othercase = UCD_OTHERCASE(c)) != c) break; 
   }
@@ -3155,7 +3155,7 @@
 #ifdef SUPPORT_UCP
   if (utf && c != NOTACHAR && (options & PCRE_CASELESS) != 0)
     {
-    int ocs = UCD_CASESET(next);
+    unsigned int ocs = UCD_CASESET(next);
     if (ocs > 0) return check_char_prop(c, PT_CLIST, ocs, op_code >= OP_NOT);
     }
 #endif