[Spice-commits] common/canvas_base.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Wed Jan 31 15:11:22 UTC 2018
common/canvas_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8096b1206bb266b8d0b80b3e4c0d36fc621d772d
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Fri Jan 19 14:29:22 2018 +0000
canvas: Use SPICE_UNALIGNED_CAST to avoid -Wcast-align warnings
This solves https://bugs.freedesktop.org/show_bug.cgi?id=104521.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/common/canvas_base.c b/common/canvas_base.c
index 071999e..8bd2fe1 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -571,7 +571,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(*SPICE_UNALIGNED_CAST(uint32_t *, data));
data += 4;
dec_size = LZ4_decompress_safe_continue(stream, (const char *) data,
(char *) dest, enc_size, available);
More information about the Spice-commits
mailing list