summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2016-07-27 18:00:12 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2016-07-27 18:00:12 +0000
commitb9e7721c74fae901b3c6821e959b4b91e404370e (patch)
tree39cc89bce99673aa1592dfc0313b0fe6fbcb6bbd
parentdcf638cb581fe943954ee94bc624a69d36bdfac6 (diff)
downloadpcre2-b9e7721c74fae901b3c6821e959b4b91e404370e.tar.gz
Tidy code to get rid of compiler warnings.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@550 6239d852-aaf2-0410-a92c-79f79f948069
-rw-r--r--ChangeLog4
-rw-r--r--src/pcre2_printint.c2
-rw-r--r--src/pcre2test.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 87c107a..3dcebb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ Change Log for PCRE2
--------------------
-Version 10.22 29-June-2016
+Version 10.22 29-July-2016
--------------------------
1. Applied Jason Hood's patches to RunTest.bat and testdata/wintestoutput3
@@ -174,6 +174,8 @@ large stack size when testing with clang.
45. Fix unaligned accesses on x86. Patch by Marc Mutz.
+46. Fix some more clang compiler warnings.
+
Version 10.21 12-January-2016
-----------------------------
diff --git a/src/pcre2_printint.c b/src/pcre2_printint.c
index 40a633c..2d30926 100644
--- a/src/pcre2_printint.c
+++ b/src/pcre2_printint.c
@@ -214,7 +214,7 @@ while (*ptr != '\0')
static void
print_custring_bylen(FILE *f, PCRE2_SPTR ptr, PCRE2_UCHAR len)
{
-while (len-- > 0)
+for (; len > 0; len--)
{
register uint32_t c = *ptr++;
if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x{%x}", c);
diff --git a/src/pcre2test.c b/src/pcre2test.c
index 1e24f7d..a8dffa3 100644
--- a/src/pcre2test.c
+++ b/src/pcre2test.c
@@ -4663,7 +4663,7 @@ else if ((pat_patctl.control & CTL_EXPAND) != 0)
pt = pbuffer8 + pt_offset;
}
- while (count-- > 0)
+ for (; count > 0; count--)
{
memcpy(pt, pc, length);
pt += length;