From 3f4cb3d37fb74db3580029624c8acd83dd5f4787 Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Mon, 13 Apr 2009 16:31:01 +0000 Subject: 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 --- block-qcow.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'block-qcow.c') 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; -- cgit v1.2.3