* [PATCH] Fix variadic formatting in blktap2 breaking xen-unstable building on x86_32
@ 2009-06-26 17:19 Tim Post
2009-06-26 18:24 ` Brendan Cully
0 siblings, 1 reply; 4+ messages in thread
From: Tim Post @ 2009-06-26 17:19 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
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.
Cheers,
--Tim
[-- Attachment #2: fix-xen-unstable-build-blktap2.patch --]
[-- Type: text/x-patch, Size: 1440 bytes --]
diff -r 442fb5f1e0a2 tools/blktap2/drivers/block-ram.c
--- a/tools/blktap2/drivers/block-ram.c Tue Jun 23 17:32:07 2009 +0100
+++ 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);
return 0;
@@ -126,7 +126,7 @@ int tdram_open (td_driver_t *driver, con
"sector_shift [%llu]\n",
(long long unsigned)(driver->info.size << SECTOR_SHIFT),
(long long unsigned)driver->info.size);
- DPRINTF("Image sector_size: \n\t[%lu]\n",
+ DPRINTF("Image sector_size: \n\t[%llu]\n",
driver->info.sector_size);
prv->fd = -1;
diff -r 442fb5f1e0a2 tools/blktap2/drivers/block-vhd.c
--- a/tools/blktap2/drivers/block-vhd.c Tue Jun 23 17:32:07 2009 +0100
+++ b/tools/blktap2/drivers/block-vhd.c Sat Jun 27 01:12:22 2009 +0800
@@ -649,7 +649,7 @@ __vhd_open(td_driver_t *driver, const ch
driver->info.sector_size = VHD_SECTOR_SIZE;
driver->info.info = 0;
- DBG(TLOG_INFO, "vhd_open: done (sz:%"PRIu64", sct:%lu, inf:%u)\n",
+ DBG(TLOG_INFO, "vhd_open: done (sz:%"PRIu64", sct:%llu, inf:%u)\n",
driver->info.size, driver->info.sector_size, driver->info.info);
if (test_vhd_flag(flags, VHD_FLAG_OPEN_STRICT) &&
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Fix variadic formatting in blktap2 breaking xen-unstable building on x86_32
2009-06-26 17:19 [PATCH] Fix variadic formatting in blktap2 breaking xen-unstable building on x86_32 Tim Post
@ 2009-06-26 18:24 ` Brendan Cully
2009-06-26 18:40 ` Tim Post
0 siblings, 1 reply; 4+ messages in thread
From: Brendan Cully @ 2009-06-26 18:24 UTC (permalink / raw)
To: Tim Post; +Cc: xen-devel
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.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Fix variadic formatting in blktap2 breaking xen-unstable building on x86_32
2009-06-26 18:24 ` Brendan Cully
@ 2009-06-26 18:40 ` Tim Post
2009-06-26 18:48 ` Ryan O'Connor
0 siblings, 1 reply; 4+ messages in thread
From: Tim Post @ 2009-06-26 18:40 UTC (permalink / raw)
To: Brendan Cully; +Cc: xen-devel
On Fri, 2009-06-26 at 11:24 -0700, Brendan Cully wrote:
> This just ping-pongs between breaking 32-bit and 64-bit. I think you
> want to use PRIu64 in all these cases.
Yes, sorry for sending without really looking, was leaving my office at
the time. Several macros also need fixed, I'll re-send the patch
tomorrow morning (its 2:39 AM my time now) .. unless someone else does
it first.
Cheers,
--Tim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix variadic formatting in blktap2 breaking xen-unstable building on x86_32
2009-06-26 18:40 ` Tim Post
@ 2009-06-26 18:48 ` Ryan O'Connor
0 siblings, 0 replies; 4+ messages in thread
From: Ryan O'Connor @ 2009-06-26 18:48 UTC (permalink / raw)
To: Tim Post; +Cc: Brendan Cully, xen-devel
Hi Tim,
On Sat, Jun 27, 2009 at 02:40:48AM +0800, Tim Post wrote:
> On Fri, 2009-06-26 at 11:24 -0700, Brendan Cully wrote:
>
> > This just ping-pongs between breaking 32-bit and 64-bit. I think you
> > want to use PRIu64 in all these cases.
>
> Yes, sorry for sending without really looking, was leaving my office at
> the time. Several macros also need fixed, I'll re-send the patch
> tomorrow morning (its 2:39 AM my time now) .. unless someone else does
> it first.
I believe that this was filed by c/s 19826
cheers,
Ryan
--
Ryan O'Connor <rjo@cs.ubc.ca>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-26 18:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-26 17:19 [PATCH] Fix variadic formatting in blktap2 breaking xen-unstable building on x86_32 Tim Post
2009-06-26 18:24 ` Brendan Cully
2009-06-26 18:40 ` Tim Post
2009-06-26 18:48 ` Ryan O'Connor
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.