[libxml2] Fix -Wempty-body warning from clang



commit cedf84d35ab127dd24f9bcbf8b8339518d0e8928
Author: Nico Weber <thakis chromium org>
Date:   Mon Mar 5 16:36:59 2012 +0800

    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.

 pattern.c |    3 ++-
 uri.c     |    9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/pattern.c b/pattern.c
index 0e38c2d..8cd69ae 100644
--- a/pattern.c
+++ b/pattern.c
@@ -305,7 +305,8 @@ xmlNewPatParserContext(const xmlChar *pattern, xmlDictPtr dict,
     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 @@ xmlNormalizeURIPath(char *path) {
           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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]