|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Compile error with Ubuntu 11.10
Ian Campbell writes ("Re: [Xen-devel] Compile error with Ubuntu 11.10"):
> I expect that this needs to change to be
> return libxl__xs_write(gc, XBT_NULL, path, "%s", libxl__strdup(gc,
> libxl_device_model_version_to_string(dm_info->device_model_version)));
> (note the additional "%s",)
>
> Can you try that?
Here's a patch which I think should fix this. Adda, can you try it
please ?
libxl: Fix format string problem resulting in compile warning
Fixes:
libxl_create.c:465: error: format not a string literal and no format
arguments
(The warning does not relate to security problem in this case,
because the string erroneously used as a format came from our enum
conversion and is safe.)
Also remove a redundant strdup.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
diff -r 617b56ea3291 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c Thu Dec 01 16:28:51 2011 +0000
+++ b/tools/libxl/libxl_create.c Thu Dec 01 16:52:30 2011 +0000
@@ -461,8 +461,8 @@ static int store_libxl_entry(libxl__gc *
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,
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |