From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Pounce Subject: Re: Compile error with Ubuntu 11.10 Date: Fri, 2 Dec 2011 18:01:17 +0000 Message-ID: <20111202180117.GD6331@citrix.com> References: <1322736422.31810.197.camel@zakaz.uk.xensource.com> <20183.46573.894123.974575@mariner.uk.xensource.com> <1322762470.7376.27.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1322762470.7376.27.camel@dagon.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org 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;