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

[Xen-changelog] [xen-unstable] xl: fix compiler warnings



# HG changeset patch
# User Andre Przywara <andre.przywara@xxxxxxx>
# Date 1323711795 0
# Node ID efb9359f486d94f1db5d70cb22b2eff133eb5f4d
# Parent  f1ab2c2138d8a12a3407dd10a4db704382087d65
xl: fix compiler warnings

either GCC 4.6.1 or Ubuntu add -Werror=format-security to the -Wall set,
so libxl compilation breaks:
   libxl_create.c: In function 'store_libxl_entry':
   libxl_create.c:454:9: error: format not a string literal and no
format arguments [-Werror=format-security]
   cc1: all warnings being treated as errors

Attached patch fixes this and another occurrence.

Patch from: Uwe Dannowski

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r f1ab2c2138d8 -r efb9359f486d tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Mon Dec 12 10:47:26 2011 +0100
+++ b/tools/libxl/libxl_create.c        Mon Dec 12 17:43:15 2011 +0000
@@ -461,7 +461,7 @@
 
     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,
+    return libxl__xs_write(gc, XBT_NULL, path, "%s", libxl__strdup(gc,
         libxl_device_model_version_to_string(dm_info->device_model_version)));
 }
 
diff -r f1ab2c2138d8 -r efb9359f486d tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Mon Dec 12 10:47:26 2011 +0100
+++ b/tools/libxl/libxl_device.c        Mon Dec 12 17:43:15 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, libxl__sprintf(gc, "%s", 
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®.