mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
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.
This commit is contained in:
committed by
Daniel Veillard
parent
5cf1deb080
commit
cedf84d35a
@@ -305,7 +305,8 @@ xmlNewPatParserContext(const xmlChar *pattern, xmlDictPtr dict,
|
|||||||
cur->base = pattern;
|
cur->base = pattern;
|
||||||
if (namespaces != NULL) {
|
if (namespaces != NULL) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0;namespaces[2 * i] != NULL;i++);
|
for (i = 0;namespaces[2 * i] != NULL;i++)
|
||||||
|
;
|
||||||
cur->nb_namespaces = i;
|
cur->nb_namespaces = i;
|
||||||
} else {
|
} else {
|
||||||
cur->nb_namespaces = 0;
|
cur->nb_namespaces = 0;
|
||||||
|
|||||||
9
uri.c
9
uri.c
@@ -1604,10 +1604,11 @@ xmlNormalizeURIPath(char *path) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Valgrind complained, strcpy(cur, segp + 3); */
|
/* Valgrind complained, strcpy(cur, segp + 3); */
|
||||||
/* string will overlap, do not use strcpy */
|
/* string will overlap, do not use strcpy */
|
||||||
tmp = cur;
|
tmp = cur;
|
||||||
segp += 3;
|
segp += 3;
|
||||||
while ((*tmp++ = *segp++) != 0);
|
while ((*tmp++ = *segp++) != 0)
|
||||||
|
;
|
||||||
|
|
||||||
/* If there are no previous segments, then keep going from here. */
|
/* If there are no previous segments, then keep going from here. */
|
||||||
segp = cur;
|
segp = cur;
|
||||||
|
|||||||
Reference in New Issue
Block a user