Revision: 883
http://vcs.pcre.org/viewvc?view=rev&revision=883
Author: zherczeg
Date: 2012-01-16 08:35:42 +0000 (Mon, 16 Jan 2012)
Log Message:
-----------
Fix compiler warnings
Modified Paths:
--------------
code/trunk/RunTest.bat
code/trunk/pcre_get.c
code/trunk/pcre_jit_compile.c
Modified: code/trunk/RunTest.bat
===================================================================
--- code/trunk/RunTest.bat 2012-01-15 18:45:27 UTC (rev 882)
+++ code/trunk/RunTest.bat 2012-01-16 08:35:42 UTC (rev 883)
@@ -231,7 +231,6 @@
)
if errorlevel 1 (
echo. failed comparison: fc /n "%srcdir%\testdata\%testoutput%" "%2%bits%\%testoutput%"
- set failed="yes"
if [%1]==[2] (
echo.
echo ** Test 2 requires a lot of stack. PCRE can be configured to
@@ -242,13 +241,14 @@
echo.
)
if [%1]==[3] (
- set failed="no"
echo.
echo ** Test 3 failure usually means french locale is not
echo ** available on the system, rather than a bug or problem with PCRE.
echo.
+ goto :eof
)
+ set failed="yes"
goto :eof
)
@@ -370,6 +370,7 @@
echo Test 14 Skipped when running 16-bit tests.
goto :eof
)
+ copy /Y "%srcdir%\testdata\saved16" testsaved16
call :runsub 14 testout "Specials for the basic 8-bit library" -q
call :runsub 14 testoutstudy "Test with Study Override" -q -s
if %jit% EQU 1 call :runsub 14 testoutjit "Test with JIT Override" -q -s+
Modified: code/trunk/pcre_get.c
===================================================================
--- code/trunk/pcre_get.c 2012-01-15 18:45:27 UTC (rev 882)
+++ code/trunk/pcre_get.c 2012-01-16 08:35:42 UTC (rev 883)
@@ -236,18 +236,21 @@
{
const REAL_PCRE *re = (const REAL_PCRE *)code;
int entrysize;
-pcre_uchar *first, *last;
pcre_uchar *entry;
#ifdef COMPILE_PCRE8
+char *first, *last;
+#else
+PCRE_UCHAR16 *first, *last;
+#endif
+
+#ifdef COMPILE_PCRE8
if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
return pcre_get_stringnumber(code, stringname);
-entrysize = pcre_get_stringtable_entries(code, stringname,
- (char **)&first, (char **)&last);
+entrysize = pcre_get_stringtable_entries(code, stringname, &first, &last);
#else
if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
return pcre16_get_stringnumber(code, stringname);
-entrysize = pcre16_get_stringtable_entries(code, stringname,
- (PCRE_UCHAR16 **)&first, (PCRE_UCHAR16 **)&last);
+entrysize = pcre16_get_stringtable_entries(code, stringname, &first, &last);
#endif
if (entrysize <= 0) return entrysize;
for (entry = (pcre_uchar *)first; entry <= (pcre_uchar *)last; entry += entrysize)
Modified: code/trunk/pcre_jit_compile.c
===================================================================
--- code/trunk/pcre_jit_compile.c 2012-01-15 18:45:27 UTC (rev 882)
+++ code/trunk/pcre_jit_compile.c 2012-01-16 08:35:42 UTC (rev 883)
@@ -352,6 +352,9 @@
frame_setstrbegin = -1
};
+/* Undefine sljit macros. */
+#undef CMP
+
/* Used for accessing the elements of the stack. */
#define STACK(i) ((-(i) - 1) * (int)sizeof(sljit_w))