xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools: libxl: Use correct printf format for uint64_t
@ 2015-07-24 10:41 Ian Campbell
  2015-07-24 10:42 ` Ian Jackson
  2015-07-24 10:42 ` Wei Liu
  0 siblings, 2 replies; 4+ messages in thread
From: Ian Campbell @ 2015-07-24 10:41 UTC (permalink / raw)
  To: ian.jackson, wei.liu2, xen-devel; +Cc: Tiejun Chen, Ian Campbell

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@citrix.com>
Cc: Tiejun Chen <tiejun.chen@intel.com>
---
 tools/libxl/libxl_dm.c | 5 +++--
 1 file 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);
 
             /*
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools: libxl: Use correct printf format for uint64_t
  2015-07-24 10:41 [PATCH] tools: libxl: Use correct printf format for uint64_t Ian Campbell
@ 2015-07-24 10:42 ` Ian Jackson
  2015-07-24 10:42 ` Wei Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2015-07-24 10:42 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Tiejun Chen, wei.liu2, xen-devel

Ian Campbell writes ("[PATCH] 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@citrix.com>
> Cc: Tiejun Chen <tiejun.chen@intel.com>

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools: libxl: Use correct printf format for uint64_t
  2015-07-24 10:41 [PATCH] tools: libxl: Use correct printf format for uint64_t Ian Campbell
  2015-07-24 10:42 ` Ian Jackson
@ 2015-07-24 10:42 ` Wei Liu
  2015-07-24 11:08   ` Ian Campbell
  1 sibling, 1 reply; 4+ messages in thread
From: Wei Liu @ 2015-07-24 10:42 UTC (permalink / raw)
  To: Ian Campbell; +Cc: wei.liu2, Tiejun Chen, ian.jackson, xen-devel

On Fri, Jul 24, 2015 at 11:41:17AM +0100, Ian Campbell wrote:
> 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@citrix.com>
> Cc: Tiejun Chen <tiejun.chen@intel.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  tools/libxl/libxl_dm.c | 5 +++--
>  1 file 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);
>  
>              /*
> -- 
> 2.1.4

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools: libxl: Use correct printf format for uint64_t
  2015-07-24 10:42 ` Wei Liu
@ 2015-07-24 11:08   ` Ian Campbell
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2015-07-24 11:08 UTC (permalink / raw)
  To: Wei Liu; +Cc: Tiejun Chen, ian.jackson, xen-devel

On Fri, 2015-07-24 at 11:42 +0100, Wei Liu wrote:
> On Fri, Jul 24, 2015 at 11:41:17AM +0100, Ian Campbell wrote:
> > 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@citrix.com>
> > Cc: Tiejun Chen <tiejun.chen@intel.com>
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>

Applied, thanks.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-24 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24 10:41 [PATCH] tools: libxl: Use correct printf format for uint64_t Ian Campbell
2015-07-24 10:42 ` Ian Jackson
2015-07-24 10:42 ` Wei Liu
2015-07-24 11:08   ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).