[libvirt] [PATCH] xml: avoid compiler warning

Eric Blake eblake at redhat.com
Mon Feb 14 20:40:49 UTC 2011


Detected by clang.

* src/util/xml.c (virXPathStringLimit): Use %zd, not obsolete %Zd.
---

Pushing under the trivial rule; just because glibc treats %Zd as
a synonym for %zd does not mean other platforms do likewise, nor
that gettext() gracefully handles it.

 src/util/xml.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/util/xml.c b/src/util/xml.c
index de5e9de..ff340d8 100644
--- a/src/util/xml.c
+++ b/src/util/xml.c
@@ -105,7 +105,7 @@ virXPathStringLimit(const char *xpath,

     if (tmp != NULL && strlen(tmp) >= maxlen) {
         virXMLError(VIR_ERR_INTERNAL_ERROR,
-                    _("\'%s\' value longer than %Zd bytes in virXPathStringLimit()"),
+                    _("\'%s\' value longer than %zd bytes in virXPathStringLimit()"),
                     xpath, maxlen);
             return NULL;
     }
-- 
1.7.4




More information about the libvir-list mailing list