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

[Xen-changelog] [xen master] tools: libxl: Use correct printf format for uint64_t



commit 78222eb476e24833880a94e8cbd193e797abbe18
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Fri Jul 24 11:41:17 2015 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Jul 24 11:44:41 2015 +0100

    tools: libxl: Use correct printf format for uint64_t

    Since 25652f232cbe "tools/libxl: detect and avoid conflicts with RDM"
    the build is broken for x86_32 and arm32 with:

    libxl_dm.c: In function â??libxl__domain_device_construct_rdmâ??:
    libxl_dm.c:349:13: error: format â??%lxâ?? expects argument of type â??long 
unsigned intâ??, but argument 8 has type â??uint64_tâ?? [-Werror=format=]
                 LOG(ERROR, "RDM conflict at 0x%lx.\n", 
d_config->rdms[i].start);
                 ^
    libxl_dm.c:352:13: error: format â??%lxâ?? expects argument of type â??long 
unsigned intâ??, but argument 8 has type â??uint64_tâ?? [-Werror=format=]
                 LOG(WARN, "Ignoring RDM conflict at 0x%lx.\n",

    Use PRIx64 for these.

    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Cc: Tiejun Chen <tiejun.chen@xxxxxxxxx>
---
 tools/libxl/libxl_dm.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 8d103c3..8ac007a 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -346,10 +346,11 @@ int libxl__domain_device_construct_rdm(libxl__gc *gc,
             continue;

         if (d_config->rdms[i].policy == LIBXL_RDM_RESERVE_POLICY_STRICT) {
-            LOG(ERROR, "RDM conflict at 0x%lx.\n", d_config->rdms[i].start);
+            LOG(ERROR, "RDM conflict at 0x%"PRIx64".\n",
+                       d_config->rdms[i].start);
             goto out;
         } else {
-            LOG(WARN, "Ignoring RDM conflict at 0x%lx.\n",
+            LOG(WARN, "Ignoring RDM conflict at 0x%"PRIx64".\n",
                       d_config->rdms[i].start);

             /*
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.