WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Fix variadic formatting in blktap2 breaking xen-

To: Tim Post <echo@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix variadic formatting in blktap2 breaking xen-unstable building on x86_32
From: Brendan Cully <brendan@xxxxxxxxx>
Date: Fri, 26 Jun 2009 11:24:04 -0700
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 26 Jun 2009 11:25:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1246036766.5626.76.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: echo@xxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <1246036766.5626.76.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-22)
On Saturday, 27 June 2009 at 01:19, Tim Post wrote:
> Hi,
> 
> Building the tip of xen-unstable breaks, at least on x86_32 due to
> warnings being treated as errors with gcc 4.1
> 
> The problem is variadic formatting, uint64_t is unsigned long long, yet
> in several places in blktap2 it was formatted as unsigned long.
> 
> The attached patch fixes it.
> 
> I'm not sure where this was introduced, I just pulled the xen-unstable
> tip 15 minutes ago and noticed it.
> 

> diff -r 442fb5f1e0a2 tools/blktap2/drivers/block-ram.c
> +++ b/tools/blktap2/drivers/block-ram.c       Sat Jun 27 01:12:22 2009 +0800
> @@ -101,7 +101,7 @@ static int get_image_info(int fd, td_dis
>       disksector_size = info->sector_size;
>       disksize        = info->size;
>       diskinfo        = info->info;
> -     DPRINTF("Image sector_size: \n\t[%lu]\n",
> +     DPRINTF("Image sector_size: \n\t[%llu]\n",
>               info->sector_size);

This just ping-pongs between breaking 32-bit and 64-bit. I think you
want to use PRIu64 in all these cases.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel