All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Pounce <andrew.pounce@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: Compile error with Ubuntu 11.10
Date: Fri, 2 Dec 2011 18:01:17 +0000	[thread overview]
Message-ID: <20111202180117.GD6331@citrix.com> (raw)
In-Reply-To: <1322762470.7376.27.camel@dagon.hellion.org.uk>

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;

      reply	other threads:[~2011-12-02 18:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 21:19 Compile error with Ubuntu 11.10 Adda Rathbone
2011-12-01 10:47 ` Ian Campbell
2011-12-01 17:14   ` Ian Jackson
2011-12-01 18:01     ` Ian Campbell
2011-12-02 18:01       ` Andrew Pounce [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111202180117.GD6331@citrix.com \
    --to=andrew.pounce@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.