aboutsummaryrefslogtreecommitdiff
path: root/block-qcow.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-13 16:31:01 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-13 16:31:01 +0000
commit3f4cb3d37fb74db3580029624c8acd83dd5f4787 (patch)
tree3c6d13cb27ef0fb8d2ff465ba31d3b4647ec1c27 /block-qcow.c
parent14d483eca0eb5f8b58b4b0317b734d485e4ca181 (diff)
Fix OpenSolaris gcc4 warnings: iovec type mismatches, missing 'static'
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7103 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-qcow.c')
-rw-r--r--block-qcow.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/block-qcow.c b/block-qcow.c
index b60f4c1921..b66ade35a7 100644
--- a/block-qcow.c
+++ b/block-qcow.c
@@ -583,7 +583,7 @@ static void qcow_aio_read_cb(void *opaque, int ret)
if (!acb->cluster_offset) {
if (bs->backing_hd) {
/* read from the base image */
- acb->hd_iov.iov_base = acb->buf;
+ acb->hd_iov.iov_base = (void *)acb->buf;
acb->hd_iov.iov_len = acb->n * 512;
qemu_iovec_init_external(&acb->hd_qiov, &acb->hd_iov, 1);
acb->hd_aiocb = bdrv_aio_readv(bs->backing_hd, acb->sector_num,
@@ -607,7 +607,7 @@ static void qcow_aio_read_cb(void *opaque, int ret)
ret = -EIO;
goto done;
}
- acb->hd_iov.iov_base = acb->buf;
+ acb->hd_iov.iov_base = (void *)acb->buf;
acb->hd_iov.iov_len = acb->n * 512;
qemu_iovec_init_external(&acb->hd_qiov, &acb->hd_iov, 1);
acb->hd_aiocb = bdrv_aio_readv(s->hd,
@@ -643,7 +643,7 @@ static BlockDriverAIOCB *qcow_aio_readv(BlockDriverState *bs,
if (qiov->niov > 1)
acb->buf = acb->orig_buf = qemu_memalign(512, qiov->size);
else
- acb->buf = qiov->iov->iov_base;
+ acb->buf = (uint8_t *)qiov->iov->iov_base;
acb->nb_sectors = nb_sectors;
acb->n = 0;
acb->cluster_offset = 0;
@@ -738,8 +738,9 @@ static BlockDriverAIOCB *qcow_aio_writev(BlockDriverState *bs,
if (qiov->niov > 1) {
acb->buf = acb->orig_buf = qemu_memalign(512, qiov->size);
qemu_iovec_to_buffer(qiov, acb->buf);
- } else
- acb->buf = qiov->iov->iov_base;
+ } else {
+ acb->buf = (uint8_t *)qiov->iov->iov_base;
+ }
acb->nb_sectors = nb_sectors;
acb->n = 0;