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

Re: [Xen-devel] [PATCH] tools: libxl: Use correct printf format for uint64_t



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@xxxxxxxxxx>
> Cc: Tiejun Chen <tiejun.chen@xxxxxxxxx>

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

> ---
>  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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.