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

Re: [Xen-devel] Compile error with Ubuntu 11.10



IanC - I have tried the two patches that you provided and this appears to fix 
this problem in that I can now compile on my ubuntu 11.10 desktop.


libxl: Fix format string problem resulting in compile warning 
libxl: build with -Wformat-nonliteral 


 -Andrew


The combined patch is (against http://xenbits.xen.org/xen-unstable.hg ):-

diff -r 62ff6a318c5d tools/libxl/Makefile
--- a/tools/libxl/Makefile      Wed Nov 30 16:59:58 2011 -0800
+++ b/tools/libxl/Makefile      Fri Dec 02 17:49:57 2011 +0000
@@ -11,7 +11,7 @@
 XLUMAJOR = 1.0
 XLUMINOR = 0
 
-CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations
+CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations 
-Wformat-nonliteral
 CFLAGS += -I. -fPIC
 
 ifeq ($(CONFIG_Linux),y)
diff -r 62ff6a318c5d tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Wed Nov 30 16:59:58 2011 -0800
+++ b/tools/libxl/libxl_create.c        Fri Dec 02 17:49:57 2011 +0000
@@ -461,8 +461,8 @@
 
     path = libxl__xs_libxl_path(gc, domid);
     path = libxl__sprintf(gc, "%s/dm-version", path);
-    return libxl__xs_write(gc, XBT_NULL, path, 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 62ff6a318c5d tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Wed Nov 30 16:59:58 2011 -0800
+++ b/tools/libxl/libxl_device.c        Fri Dec 02 17:49:57 2011 +0000
@@ -516,7 +516,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, 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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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