Revision: 550
http://www.exim.org/viewvc/pcre2?view=rev&revision=550
Author: ph10
Date: 2016-07-27 19:00:12 +0100 (Wed, 27 Jul 2016)
Log Message:
-----------
Tidy code to get rid of compiler warnings.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/src/pcre2_printint.c
code/trunk/src/pcre2test.c
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2016-07-27 17:58:38 UTC (rev 549)
+++ code/trunk/ChangeLog 2016-07-27 18:00:12 UTC (rev 550)
@@ -2,7 +2,7 @@
--------------------
-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,7 +174,9 @@
45. Fix unaligned accesses on x86. Patch by Marc Mutz.
+46. Fix some more clang compiler warnings.
+
Version 10.21 12-January-2016
-----------------------------
Modified: code/trunk/src/pcre2_printint.c
===================================================================
--- code/trunk/src/pcre2_printint.c 2016-07-27 17:58:38 UTC (rev 549)
+++ code/trunk/src/pcre2_printint.c 2016-07-27 18:00:12 UTC (rev 550)
@@ -214,7 +214,7 @@
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);
Modified: code/trunk/src/pcre2test.c
===================================================================
--- code/trunk/src/pcre2test.c 2016-07-27 17:58:38 UTC (rev 549)
+++ code/trunk/src/pcre2test.c 2016-07-27 18:00:12 UTC (rev 550)
@@ -4663,7 +4663,7 @@
pt = pbuffer8 + pt_offset;
}
- while (count-- > 0)
+ for (; count > 0; count--)
{
memcpy(pt, pc, length);
pt += length;