Revision: 476
http://vcs.pcre.org/viewvc?view=rev&revision=476
Author: ph10
Date: 2010-01-03 15:37:24 +0000 (Sun, 03 Jan 2010)
Log Message:
-----------
Add casts to avoid compiler warnings.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/pcre_dfa_exec.c
code/trunk/pcre_exec.c
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2010-01-02 18:21:30 UTC (rev 475)
+++ code/trunk/ChangeLog 2010-01-03 15:37:24 UTC (rev 476)
@@ -53,6 +53,9 @@
instead, thus avoiding the use of floating point arithmetic. (There is no
other use of FP in PCRE.) If int64_t is not found, the fallback is to
double.
+
+9. Added two casts to avoid signed/unsigned warnings from VS Studio Express
+ 2005 (difference between two addresses compared to an unsigned value).
Modified: code/trunk/pcre_dfa_exec.c
===================================================================
--- code/trunk/pcre_dfa_exec.c 2010-01-02 18:21:30 UTC (rev 475)
+++ code/trunk/pcre_dfa_exec.c 2010-01-03 15:37:24 UTC (rev 476)
@@ -2991,7 +2991,7 @@
bytes to avoid spending too much time in this optimization. */
if (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0 &&
- end_subject - current_subject < study->minlength)
+ (pcre_uint32)(end_subject - current_subject) < study->minlength)
return PCRE_ERROR_NOMATCH;
/* If req_byte is set, we know that that character must appear in the
Modified: code/trunk/pcre_exec.c
===================================================================
--- code/trunk/pcre_exec.c 2010-01-02 18:21:30 UTC (rev 475)
+++ code/trunk/pcre_exec.c 2010-01-03 15:37:24 UTC (rev 476)
@@ -5572,7 +5572,7 @@
bytes to avoid spending too much time in this optimization. */
if (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0 &&
- end_subject - start_match < study->minlength)
+ (pcre_uint32)(end_subject - start_match) < study->minlength)
{
rc = MATCH_NOMATCH;
break;