aboutsummaryrefslogtreecommitdiff
path: root/block-qcow2.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-qcow2.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-qcow2.c')
-rw-r--r--block-qcow2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/block-qcow2.c b/block-qcow2.c
index 3bd38b0d9d..da8fb42b0c 100644
--- a/block-qcow2.c
+++ b/block-qcow2.c
@@ -1346,7 +1346,7 @@ static void qcow_aio_read_cb(void *opaque, int ret)
n1 = backing_read1(bs->backing_hd, acb->sector_num,
acb->buf, acb->n);
if (n1 > 0) {
- 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,
@@ -1381,7 +1381,7 @@ static void qcow_aio_read_cb(void *opaque, int ret)
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,
@@ -1417,8 +1417,9 @@ static QCowAIOCB *qcow_aio_setup(BlockDriverState *bs,
acb->buf = acb->orig_buf = qemu_memalign(512, qiov->size);
if (is_write)
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;
acb->cluster_offset = 0;