* [Qemu-devel] [PATCH] block: avoid a warning on 64 bit hosts with long as int64_t
@ 2010-10-30 16:46 Blue Swirl
2010-11-02 15:05 ` [Qemu-devel] " Kevin Wolf
0 siblings, 1 reply; 2+ messages in thread
From: Blue Swirl @ 2010-10-30 16:46 UTC (permalink / raw)
To: Kevin Wolf, qemu-devel
When building on a 64 bit host which uses 'long' for int64_t,
GCC emits a warning:
CC block/blkverify.o
/src/qemu/block/blkverify.c: In function `blkverify_verify_readv':
/src/qemu/block/blkverify.c:304: warning: long long int format, long
unsigned int arg (arg 3)
Rework a77cffe7e916f4dd28f2048982ea2e0d98143b11 to avoid the warning.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
block/blkverify.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blkverify.c b/block/blkverify.c
index b2a12fe..4d9ab6b 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -300,8 +300,8 @@ static void blkverify_verify_readv(BlkverifyAIOCB *acb)
{
ssize_t offset = blkverify_iovec_compare(acb->qiov, &acb->raw_qiov);
if (offset != -1) {
- blkverify_err(acb, "contents mismatch in sector %lld",
- acb->sector_num + (offset / BDRV_SECTOR_SIZE));
+ blkverify_err(acb, "contents mismatch in sector %" PRId64,
+ acb->sector_num + (int64_t)(offset / BDRV_SECTOR_SIZE));
}
}
--
1.6.2.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [PATCH] block: avoid a warning on 64 bit hosts with long as int64_t
2010-10-30 16:46 [Qemu-devel] [PATCH] block: avoid a warning on 64 bit hosts with long as int64_t Blue Swirl
@ 2010-11-02 15:05 ` Kevin Wolf
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2010-11-02 15:05 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
Am 30.10.2010 18:46, schrieb Blue Swirl:
> When building on a 64 bit host which uses 'long' for int64_t,
> GCC emits a warning:
> CC block/blkverify.o
> /src/qemu/block/blkverify.c: In function `blkverify_verify_readv':
> /src/qemu/block/blkverify.c:304: warning: long long int format, long
> unsigned int arg (arg 3)
>
> Rework a77cffe7e916f4dd28f2048982ea2e0d98143b11 to avoid the warning.
>
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-02 15:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-30 16:46 [Qemu-devel] [PATCH] block: avoid a warning on 64 bit hosts with long as int64_t Blue Swirl
2010-11-02 15:05 ` [Qemu-devel] " Kevin Wolf
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.