Fix -Wempty-body warning from clang
clang recently grew a warning on `for (...);`. This patch
fixes all two instances of this pattern in libxml. The changes
don't modify the code semantic.
diff --git a/pattern.c b/pattern.c
index 0e38c2d..8cd69ae 100644
--- a/pattern.c
+++ b/pattern.c
@@ -305,7 +305,8 @@
cur->base = pattern;
if (namespaces != NULL) {
int i;
- for (i = 0;namespaces[2 * i] != NULL;i++);
+ for (i = 0;namespaces[2 * i] != NULL;i++)
+ ;
cur->nb_namespaces = i;
} else {
cur->nb_namespaces = 0;
diff --git a/uri.c b/uri.c
index 1ae5768..bd2e96d 100644
--- a/uri.c
+++ b/uri.c
@@ -1604,10 +1604,11 @@
break;
}
/* Valgrind complained, strcpy(cur, segp + 3); */
- /* string will overlap, do not use strcpy */
- tmp = cur;
- segp += 3;
- while ((*tmp++ = *segp++) != 0);
+ /* string will overlap, do not use strcpy */
+ tmp = cur;
+ segp += 3;
+ while ((*tmp++ = *segp++) != 0)
+ ;
/* If there are no previous segments, then keep going from here. */
segp = cur;