]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/virsh.c: applied patch from Jim Meyering to add printf-style
authorDaniel Veillard <veillard@redhat.com>
Mon, 19 Mar 2007 14:20:30 +0000 (14:20 +0000)
committerDaniel Veillard <veillard@redhat.com>
Mon, 19 Mar 2007 14:20:30 +0000 (14:20 +0000)
  function checking in virsh.c and fix one warning raised
Daniel

ChangeLog
src/virsh.c

index a1a03db28e6272759c470ce1ecf5a9d13f17725f..dae6b5da7ab49ad02c15bab41d2768589681e677 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 19 15:19:06 CET 2007 Daniel Veillard <veillard@redhat.com>
+
+       * src/virsh.c: applied patch from Jim Meyering to add printf-style
+         function checking in virsh.c and fix one warning raised
+
 Mon Mar 19 15:15:51 CET 2007 Daniel Veillard <veillard@redhat.com>
 
        * qemud/protocol.h src/internal.h: applied patch from Jim Meyering
index 521e2fcc8a9a2f0a0859b7e3df9867126a657fd9..5302d4e8f74d8a28e81803f0399ee870d113a702 100644 (file)
@@ -179,8 +179,8 @@ typedef struct __vshControl {
 
 static vshCmdDef commands[];
 
-static void vshError(vshControl * ctl, int doexit, const char *format,
-                     ...);
+static void vshError(vshControl * ctl, int doexit, const char *format, ...)
+    ATTRIBUTE_FORMAT(printf, 3, 4);
 static int vshInit(vshControl * ctl);
 static int vshDeinit(vshControl * ctl);
 static void vshUsage(vshControl * ctl, const char *cmdname);
@@ -3158,8 +3158,8 @@ _vshStrdup(vshControl * ctl, const char *s, const char *filename, int line)
 
     if ((x = strdup(s)))
         return x;
-    vshError(ctl, TRUE, _("%s: %d: failed to allocate %d bytes"),
-             filename, line, strlen(s));
+    vshError(ctl, TRUE, _("%s: %d: failed to allocate %lu bytes"),
+             filename, line, (unsigned long)strlen(s));
     return NULL;
 }