[Pcre-svn] [1145] code/trunk: Clean up compiler warnings for…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [1145] code/trunk: Clean up compiler warnings for pcre_exec.c in all modes.
Revision: 1145
          http://vcs.pcre.org/viewvc?view=rev&revision=1145
Author:   ph10
Date:     2012-10-19 17:25:32 +0100 (Fri, 19 Oct 2012)


Log Message:
-----------
Clean up compiler warnings for pcre_exec.c in all modes.

Modified Paths:
--------------
    code/trunk/pcre_exec.c
    code/trunk/pcre_internal.h


Modified: code/trunk/pcre_exec.c
===================================================================
--- code/trunk/pcre_exec.c    2012-10-19 16:19:55 UTC (rev 1144)
+++ code/trunk/pcre_exec.c    2012-10-19 16:25:32 UTC (rev 1145)
@@ -630,7 +630,7 @@
 int length;
 int max;
 int min;
-int number;
+unsigned int number;
 int offset;
 pcre_uchar op;
 int save_capture_last;
@@ -1311,7 +1311,7 @@
         }
       else
         {
-        int recno = GET2(ecode, LINK_SIZE + 2);   /* Recursion group number*/
+        unsigned int recno = GET2(ecode, LINK_SIZE + 2);   /* Recursion group number*/
         condition = (recno == RREF_ANY || recno == md->recursive->group_num);


         /* If the test is for recursion into a specific subpattern, and it is
@@ -1383,7 +1383,7 @@


       if (!condition && condcode == OP_NCREF)
         {
-        int refno = offset >> 1;
+        unsigned int refno = offset >> 1;
         pcre_uchar *slotA = md->name_table;


         for (i = 0; i < md->name_count; i++)
@@ -1743,7 +1743,7 @@
     case OP_RECURSE:
       {
       recursion_info *ri;
-      int recno;
+      unsigned int recno;


       callpat = md->start_code + GET(ecode, 1);
       recno = (callpat == md->start_code)? 0 :


Modified: code/trunk/pcre_internal.h
===================================================================
--- code/trunk/pcre_internal.h    2012-10-19 16:19:55 UTC (rev 1144)
+++ code/trunk/pcre_internal.h    2012-10-19 16:25:32 UTC (rev 1145)
@@ -2428,7 +2428,7 @@


 typedef struct recursion_info {
   struct recursion_info *prevrec; /* Previous recursion record (or NULL) */
-  int group_num;                  /* Number of group that was called */
+  unsigned int group_num;         /* Number of group that was called */
   int *offset_save;               /* Pointer to start of saved offsets */
   int saved_max;                  /* Number of saved offsets */
   PCRE_PUCHAR subject_position;   /* Position at start of recursion */