[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/10] block: avoid a warning on 64 bit hosts with l
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 07/10] block: avoid a warning on 64 bit hosts with long as int64_t |
Date: |
Thu, 4 Nov 2010 14:15:36 +0100 |
From: Blue Swirl <address@hidden>
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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/blkverify.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blkverify.c b/block/blkverify.c
index 0a8d691..c7522b4 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.7.2.3
- [Qemu-devel] [PULL 00/10] Block patches, Kevin Wolf, 2010/11/04
- [Qemu-devel] [PATCH 01/10] scsi-disk: Implement rerror option, Kevin Wolf, 2010/11/04
- [Qemu-devel] [PATCH 02/10] block: Allow bdrv_flush to return errors, Kevin Wolf, 2010/11/04
- [Qemu-devel] [PATCH 03/10] scsi-disk: Complete failed requests in scsi_disk_emulate_command, Kevin Wolf, 2010/11/04
- [Qemu-devel] [PATCH 05/10] vpc: Implement bdrv_flush, Kevin Wolf, 2010/11/04
- [Qemu-devel] [PATCH 04/10] scsi-disk: Implement werror for flushes, Kevin Wolf, 2010/11/04
- [Qemu-devel] [PATCH 06/10] qcow2: Invalidate cache after failed read, Kevin Wolf, 2010/11/04
- [Qemu-devel] [PATCH 08/10] ide: Handle immediate bdrv_aio_flush failure, Kevin Wolf, 2010/11/04
- [Qemu-devel] [PATCH 07/10] block: avoid a warning on 64 bit hosts with long as int64_t,
Kevin Wolf <=
- [Qemu-devel] [PATCH 10/10] scsi-disk: Fix immediate failure of bdrv_aio_*, Kevin Wolf, 2010/11/04
- [Qemu-devel] [PATCH 09/10] virtio-blk: Handle immediate flush failure properly, Kevin Wolf, 2010/11/04
- [Qemu-devel] Re: [PULL 00/10] Block patches, Anthony Liguori, 2010/11/04