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

[Xen-changelog] [xen-unstable] libxl: Compile with -Wformat-nonliteral.



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1323790272 0
# Node ID 63e5005d58ca5674e790ef627e7fb3c8c66c5374
# Parent  846725c81ed924e03bf4e6d65f912be089c54a06
libxl: Compile with -Wformat-nonliteral.

At least one compiler (some Ubuntu version) uses this by default and it seems
like a good idea anyway and the fixup required is trivial.

One hunk is from a patch by Ian Jackson.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Reported-by: Adda Rathbone <addarathbone@xxxxxxxxxxxxxx>
Tested-by: Adda Rathbone <addarathbone@xxxxxxxxxxxxxx>
Tested-by: Andrew Pounce <andrew.pounce@xxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 846725c81ed9 -r 63e5005d58ca tools/libxl/Makefile
--- a/tools/libxl/Makefile      Tue Dec 13 13:32:23 2011 +0100
+++ b/tools/libxl/Makefile      Tue Dec 13 15:31:12 2011 +0000
@@ -12,7 +12,7 @@
 XLUMINOR = 0
 
 CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
-       -Wno-declaration-after-statement
+       -Wno-declaration-after-statement -Wformat-nonliteral
 CFLAGS += -I. -fPIC
 
 ifeq ($(CONFIG_Linux),y)
diff -r 846725c81ed9 -r 63e5005d58ca tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Tue Dec 13 13:32:23 2011 +0100
+++ b/tools/libxl/libxl_create.c        Tue Dec 13 15:31:12 2011 +0000
@@ -459,8 +459,8 @@
 
     path = libxl__xs_libxl_path(gc, domid);
     path = libxl__sprintf(gc, "%s/dm-version", path);
-    return libxl__xs_write(gc, XBT_NULL, path, "%s", libxl__strdup(gc,
-        libxl_device_model_version_to_string(dm_info->device_model_version)));
+    return libxl__xs_write(gc, XBT_NULL, path, "%s",
+        libxl_device_model_version_to_string(dm_info->device_model_version));
 }
 
 static int do_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
diff -r 846725c81ed9 -r 63e5005d58ca tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Tue Dec 13 13:32:23 2011 +0100
+++ b/tools/libxl/libxl_device.c        Tue Dec 13 15:31:12 2011 +0000
@@ -515,7 +515,7 @@
         for (j = 0; j < num_devs; j++) {
             path = libxl__sprintf(gc, "/local/domain/%d/device/%s/%s/backend",
                                   domid, kinds[i], devs[j]);
-            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, "%s", 
path));
+            path = libxl__xs_read(gc, XBT_NULL, path);
             if (path && libxl__parse_backend_path(gc, path, &dev) == 0) {
                 dev.domid = domid;
                 dev.kind = kind;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.