Re: [PATCH spice-common] canvas: Use SPICE_UNALIGNED_CAST to avoid -Wcast-align warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, Jan 19, 2018 at 02:31:35PM +0000, Frediano Ziglio wrote:
> This solves https://bugs.freedesktop.org/show_bug.cgi?id=104521.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  common/canvas_base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/canvas_base.c b/common/canvas_base.c
> index 42f0eea..5a5b8b4 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));

Acked-by: Victor Toso <victortoso@xxxxxxxxxx>,

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]