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

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [1133] code/trunk: pcre32: Fix signed-unsigned compare
Revision: 1133
          http://vcs.pcre.org/viewvc?view=rev&revision=1133
Author:   chpe
Date:     2012-10-18 19:35:30 +0100 (Thu, 18 Oct 2012)


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

Modified Paths:
--------------
    code/trunk/pcre16_ord2utf16.c
    code/trunk/pcre32_ord2utf32.c
    code/trunk/pcre_compile.c
    code/trunk/pcre_internal.h
    code/trunk/pcre_ord2utf8.c


Modified: code/trunk/pcre16_ord2utf16.c
===================================================================
--- code/trunk/pcre16_ord2utf16.c    2012-10-18 18:35:22 UTC (rev 1132)
+++ code/trunk/pcre16_ord2utf16.c    2012-10-18 18:35:30 UTC (rev 1133)
@@ -64,7 +64,7 @@
 Returns:     number of characters placed in the buffer
 */


-int
+unsigned int
PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)
{
#ifdef SUPPORT_UTF

Modified: code/trunk/pcre32_ord2utf32.c
===================================================================
--- code/trunk/pcre32_ord2utf32.c    2012-10-18 18:35:22 UTC (rev 1132)
+++ code/trunk/pcre32_ord2utf32.c    2012-10-18 18:35:30 UTC (rev 1133)
@@ -64,7 +64,7 @@
 Returns:     number of characters placed in the buffer
 */


-int
+unsigned int
PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)
{
#ifdef SUPPORT_UTF

Modified: code/trunk/pcre_compile.c
===================================================================
--- code/trunk/pcre_compile.c    2012-10-18 18:35:22 UTC (rev 1132)
+++ code/trunk/pcre_compile.c    2012-10-18 18:35:30 UTC (rev 1133)
@@ -3795,7 +3795,7 @@
   pcre_uint32 subreqchar, subfirstchar;
   pcre_int32 subreqcharflags, subfirstcharflags;
   int terminator;
-  int mclength;
+  unsigned int mclength;
   int tempbracount;
   pcre_uint32 ec;
   pcre_uchar mcbuffer[8];


Modified: code/trunk/pcre_internal.h
===================================================================
--- code/trunk/pcre_internal.h    2012-10-18 18:35:22 UTC (rev 1132)
+++ code/trunk/pcre_internal.h    2012-10-18 18:35:30 UTC (rev 1133)
@@ -2681,7 +2681,7 @@
 extern const pcre_uchar *PRIV(find_bracket)(const pcre_uchar *, BOOL, int);
 extern BOOL              PRIV(is_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
                            int *, BOOL);
-extern int               PRIV(ord2utf)(pcre_uint32, pcre_uchar *);
+extern unsigned int      PRIV(ord2utf)(pcre_uint32, pcre_uchar *);
 extern int               PRIV(valid_utf)(PCRE_PUCHAR, int, int *);
 extern BOOL              PRIV(was_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
                            int *, BOOL);


Modified: code/trunk/pcre_ord2utf8.c
===================================================================
--- code/trunk/pcre_ord2utf8.c    2012-10-18 18:35:22 UTC (rev 1132)
+++ code/trunk/pcre_ord2utf8.c    2012-10-18 18:35:30 UTC (rev 1133)
@@ -63,6 +63,7 @@
 Returns:     number of characters placed in the buffer
 */


+unsigned
int
PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)
{