[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/12] block-backend: Silence clang -m32 compiler warning
From: |
Kevin Wolf |
Subject: |
[PULL 09/12] block-backend: Silence clang -m32 compiler warning |
Date: |
Tue, 2 Nov 2021 17:05:25 +0100 |
From: Hanna Reitz <hreitz@redhat.com>
Similarly to e7e588d432d31ecebc26358e47201dd108db964c, there is a
warning in block/block-backend.c that qiov->size <= INT64_MAX is always
true on machines where size_t is narrower than a uint64_t. In said
commit, we silenced this warning by casting to uint64_t.
The commit introducing this warning here
(a93d81c84afa717b0a1a6947524d8d1fbfd6bbf5) anticipated it and so tried
to address it the same way. However, it only did so in one of two
places where this comparison occurs, and so we still need to fix up the
other one.
Fixes: a93d81c84afa717b0a1a6947524d8d1fbfd6bbf5
("block-backend: convert blk_aio_ functions to int64_t bytes
paramter")
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20211026090745.30800-1-hreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/block-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index 39cd99df2b..12ef80ea17 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1540,7 +1540,7 @@ BlockAIOCB *blk_aio_pwritev(BlockBackend *blk, int64_t
offset,
QEMUIOVector *qiov, BdrvRequestFlags flags,
BlockCompletionFunc *cb, void *opaque)
{
- assert(qiov->size <= INT64_MAX);
+ assert((uint64_t)qiov->size <= INT64_MAX);
return blk_aio_prwv(blk, offset, qiov->size, qiov,
blk_aio_write_entry, flags, cb, opaque);
}
--
2.31.1
- [PULL 01/12] block/file-posix: Fix return value translation for AIO discards, (continued)
- [PULL 01/12] block/file-posix: Fix return value translation for AIO discards, Kevin Wolf, 2021/11/02
- [PULL 02/12] block: Fail gracefully when blockdev-snapshot creates loops, Kevin Wolf, 2021/11/02
- [PULL 04/12] ide: Cap LBA28 capacity announcement to 2^28-1, Kevin Wolf, 2021/11/02
- [PULL 06/12] file-posix: add `aio-max-batch` option, Kevin Wolf, 2021/11/02
- [PULL 05/12] block/export/fuse.c: fix musl build, Kevin Wolf, 2021/11/02
- [PULL 03/12] block/rbd: implement bdrv_co_block_status, Kevin Wolf, 2021/11/02
- [PULL 08/12] linux-aio: add `dev_max_batch` parameter to laio_io_unplug(), Kevin Wolf, 2021/11/02
- [PULL 11/12] block/nvme: Display CQ/SQ pointer in nvme_free_queue_pair(), Kevin Wolf, 2021/11/02
- [PULL 12/12] block/nvme: Extract nvme_free_queue() from nvme_free_queue_pair(), Kevin Wolf, 2021/11/02
- [PULL 10/12] block/nvme: Automatically free qemu_memalign() with QEMU_AUTO_VFREE, Kevin Wolf, 2021/11/02
- [PULL 09/12] block-backend: Silence clang -m32 compiler warning,
Kevin Wolf <=
- [PULL 07/12] linux-aio: add `dev_max_batch` parameter to laio_co_submit(), Kevin Wolf, 2021/11/02
- Re: [PULL 00/12] Block layer patches, Richard Henderson, 2021/11/03