[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 18/19] block: fix a warning and possible truncation
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 18/19] block: fix a warning and possible truncation |
Date: |
Tue, 15 Jun 2010 16:19:40 +0200 |
From: Blue Swirl <address@hidden>
Fix a warning from OpenBSD gcc (3.3.5 (propolice)):
/src/qemu/block.c: In function `bdrv_info_stats_bs':
/src/qemu/block.c:1548: warning: long long int format, long unsigned
int arg (arg 6)
There may be also truncation effects.
Signed-off-by: Blue Swirl <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/block.c b/block.c
index 383d59f..3fc2969 100644
--- a/block.c
+++ b/block.c
@@ -1574,7 +1574,8 @@ static QObject* bdrv_info_stats_bs(BlockDriverState *bs)
"} }",
bs->rd_bytes, bs->wr_bytes,
bs->rd_ops, bs->wr_ops,
- bs->wr_highest_sector * (long)BDRV_SECTOR_SIZE);
+ bs->wr_highest_sector *
+ (uint64_t)BDRV_SECTOR_SIZE);
dict = qobject_to_qdict(res);
if (*bs->device_name) {
--
1.6.6.1
- [Qemu-devel] [PATCH 13/19] monitor: Make "commit FOO" complain when FOO doesn't exist, (continued)
- [Qemu-devel] [PATCH 13/19] monitor: Make "commit FOO" complain when FOO doesn't exist, Kevin Wolf, 2010/06/15
- [Qemu-devel] [PATCH 11/19] block: Move error actions from DriveInfo to BlockDriverState, Kevin Wolf, 2010/06/15
- [Qemu-devel] [PATCH 15/19] block: Decouple savevm from DriveInfo, Kevin Wolf, 2010/06/15
- [Qemu-devel] [PATCH 09/19] cow: stop using mmap, Kevin Wolf, 2010/06/15
- [Qemu-devel] [PATCH 17/19] Correct definitions for FD_CMD_SAVE and FD_CMD_RESTORE, Kevin Wolf, 2010/06/15
[Qemu-devel] [PATCH 18/19] block: fix a warning and possible truncation,
Kevin Wolf <=
[Qemu-devel] [PATCH 16/19] blockdev: Give drives internal linkage, Kevin Wolf, 2010/06/15
[Qemu-devel] [PATCH 19/19] xen: Fix build error due to missing include, Kevin Wolf, 2010/06/15
Re: [Qemu-devel] [PULL 00/19] Block patches, Anthony Liguori, 2010/06/15