[Pcre-svn] [1134] code/trunk: pcre32: Fix signed-unsigned co…

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


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

Modified Paths:
--------------
    code/trunk/pcre_fullinfo.c
    code/trunk/pcre_study.c


Modified: code/trunk/pcre_fullinfo.c
===================================================================
--- code/trunk/pcre_fullinfo.c    2012-10-18 18:35:30 UTC (rev 1133)
+++ code/trunk/pcre_fullinfo.c    2012-10-18 18:35:33 UTC (rev 1134)
@@ -136,7 +136,7 @@


   case PCRE_INFO_FIRSTBYTE:
   *((int *)where) =
-    ((re->flags & PCRE_FIRSTSET) != 0)? re->first_char :
+    ((re->flags & PCRE_FIRSTSET) != 0)? (int)re->first_char :
     ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
   break;


@@ -174,7 +174,7 @@

   case PCRE_INFO_LASTLITERAL:
   *((int *)where) =
-    ((re->flags & PCRE_REQCHSET) != 0)? re->req_char : -1;
+    ((re->flags & PCRE_REQCHSET) != 0)? (int)re->req_char : -1;
   break;


case PCRE_INFO_REQUIREDCHAR:

Modified: code/trunk/pcre_study.c
===================================================================
--- code/trunk/pcre_study.c    2012-10-18 18:35:30 UTC (rev 1133)
+++ code/trunk/pcre_study.c    2012-10-18 18:35:33 UTC (rev 1134)
@@ -632,7 +632,7 @@
 */


static void
-set_type_bits(pcre_uint8 *start_bits, int cbit_type, int table_limit,
+set_type_bits(pcre_uint8 *start_bits, int cbit_type, unsigned int table_limit,
compile_data *cd)
{
register pcre_uint32 c;
@@ -674,7 +674,7 @@
*/

static void
-set_nottype_bits(pcre_uint8 *start_bits, int cbit_type, int table_limit,
+set_nottype_bits(pcre_uint8 *start_bits, int cbit_type, unsigned int table_limit,
compile_data *cd)
{
register pcre_uint32 c;