--- common/canvas_base.c | 12 ++++++------ common/sw_canvas.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/canvas_base.c b/common/canvas_base.c index 6f48340..4351334 100644 --- a/common/canvas_base.c +++ b/common/canvas_base.c @@ -396,7 +396,7 @@ static pixman_image_t *canvas_get_quic(CanvasBase *canvas, SpiceImage *image, quic_data->current_chunk = 0; if (quic_decode_begin(quic_data->quic, - (uint32_t *)image->u.quic.data->chunk[0].data, + (uint32_t *)(void *)image->u.quic.data->chunk[0].data, image->u.quic.data->chunk[0].len >> 2, &type, &width, &height) == QUIC_ERROR) { spice_warning("quic decode begin failed"); @@ -583,7 +583,7 @@ static pixman_image_t *canvas_get_lz4(CanvasBase *canvas, SpiceImage *image) do { // Read next compressed block - enc_size = ntohl(*((uint32_t *)data)); + enc_size = ntohl(*((uint32_t *)(void *)data)); data += 4; dec_size = LZ4_decompress_safe_continue(stream, (const char *) data, (char *) dest, enc_size, available); @@ -607,8 +607,8 @@ static pixman_image_t *canvas_get_lz4(CanvasBase *canvas, SpiceImage *image) } for (row = height - 1; row > 0; --row) { uint32_t *dest_aligned, *dest_misaligned; - dest_aligned = (uint32_t *)(dest + stride_abs*row); - dest_misaligned = (uint32_t*)(dest + stride_encoded*row); + dest_aligned = (uint32_t *)(void *)(dest + stride_abs*row); + dest_misaligned = (uint32_t*)(void *)(dest + stride_encoded*row); memmove(dest_aligned, dest_misaligned, stride_encoded); } } @@ -1919,7 +1919,7 @@ static int quic_usr_more_space(QuicUsrContext *usr, uint32_t **io_ptr, int rows_ } quic_data->current_chunk++; - *io_ptr = (uint32_t *)quic_data->chunks->chunk[quic_data->current_chunk].data; + *io_ptr = (uint32_t *)(void *)quic_data->chunks->chunk[quic_data->current_chunk].data; return quic_data->chunks->chunk[quic_data->current_chunk].len >> 2; } @@ -2066,7 +2066,7 @@ static void canvas_mask_pixman(CanvasBase *canvas, /* round down X to even 32 pixels (i.e. uint32_t) */ extents.x1 = extents.x1 & ~(0x1f); - mask_data = (uint32_t *)((uint8_t *)mask_data + mask_stride * extents.y1 + extents.x1 / 32); + mask_data = (uint32_t *)(void *)((uint8_t *)mask_data + mask_stride * extents.y1 + extents.x1 / 32); mask_x -= extents.x1; mask_y -= extents.y1; mask_width = extents.x2 - extents.x1; diff --git a/common/sw_canvas.c b/common/sw_canvas.c index 7d67ca5..bb353c1 100644 --- a/common/sw_canvas.c +++ b/common/sw_canvas.c @@ -357,7 +357,7 @@ static void clear_dest_alpha(pixman_image_t *dest, } stride = pixman_image_get_stride(dest); - data = (uint32_t *) ( + data = (uint32_t *)(void *) ( (uint8_t *)pixman_image_get_data(dest) + y * stride + 4 * x); if ((*data & 0xff000000U) == 0xff000000U) { @@ -1012,7 +1012,7 @@ static void canvas_put_image(SpiceCanvas *spice_canvas, src = pixman_image_create_bits(PIXMAN_x8r8g8b8, src_width, src_height, - (uint32_t*)src_data, + (uint32_t*)(void *)src_data, src_stride); @@ -1276,7 +1276,7 @@ SpiceCanvas *canvas_create_for_data(int width, int height, uint32_t format, pixman_image_t *image; image = pixman_image_create_bits(spice_surface_format_to_pixman (format), - width, height, (uint32_t *)data, stride); + width, height, (uint32_t *)(void *)data, stride); return canvas_create_common(image, format , bits_cache -- 2.4.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel