summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-01-03 15:37:24 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-01-03 15:37:24 +0000
commit81c92f131bb24a578fcfc398f4144880d1444405 (patch)
tree7fa26b53a1848d87467c6fe94942c7e0fae31556
parentcdec198759de48457aac680223f5c64fad7b2b2c (diff)
downloadpcre-81c92f131bb24a578fcfc398f4144880d1444405.tar.gz
Add casts to avoid compiler warnings.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@476 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog3
-rw-r--r--pcre_dfa_exec.c2
-rw-r--r--pcre_exec.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 64588db..704daca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -53,6 +53,9 @@ Version 8.01 11-Dec-09
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).
diff --git a/pcre_dfa_exec.c b/pcre_dfa_exec.c
index 11a3fba..c6bea00 100644
--- a/pcre_dfa_exec.c
+++ b/pcre_dfa_exec.c
@@ -2991,7 +2991,7 @@ for (;;)
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
diff --git a/pcre_exec.c b/pcre_exec.c
index 899b92a..3daa38f 100644
--- a/pcre_exec.c
+++ b/pcre_exec.c
@@ -5572,7 +5572,7 @@ for(;;)
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;