Fix variadic formatting in blktap2 breaking xen-unstable building on x86_32
PATCH 1/1 Fix variadic formatting in blktap2 breaking xen-unstable building on x86_32
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
tools/blktap2/drivers/block-ram.c +2 -2
@@ -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 ;
tools/blktap2/drivers/block-vhd.c +1 -1
@@ -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) &&
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 17 lines · Tim Post
Hi,
Building the tip of xen-unstable breaks, at least on
x86_32due to warnings being treated as errors with gcc 4.1The problem is variadic formatting,
uint64_tis 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
442fb5f1e0a2tools/blktap2/drivers/block-ram.c
+++b/tools/blktap2/drivers/block-ram.cSat Jun 27 01:12:22 2009 +0800
tools/blktap2/drivers/block-ram.c static int get_image_info(int fd, td_dis · line 105
Quoted 6 lines
tools/blktap2/drivers/block-ram.c +1
-1@@ -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.
Quoted 2 lines · Brendan Cully
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
Hi Tim,
Quoted 9 lines · Tim Post
Quoted 2 lines · Brendan Cully
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
Signature · 1 line
Ryan O'Connor <[email protected]>