Re: [spice-server PATCH v1 5/12] red_parse_qxl: Do not compute abs unsigned int

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

 



> SpiceBitmap's stride is uint32_t.
> 
> from clang:
> red_parse_qxl.c:452:41: error: taking the absolute value of unsigned
> type 'uint32_t' (aka 'unsigned int') has no effect
> 
> bitmap_size = red->u.bitmap.y * abs(red->u.bitmap.stride);
>                                 ^
> ---
>  server/red_parse_qxl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
> index d2329a3..07c3cac 100644
> --- a/server/red_parse_qxl.c
> +++ b/server/red_parse_qxl.c
> @@ -449,7 +449,7 @@ static SpiceImage *red_get_image(RedMemSlotInfo *slots,
> int group_id,
>              red->u.bitmap.palette = rp;
>              red->u.bitmap.palette_id = rp->unique;
>          }
> -        bitmap_size = red->u.bitmap.y * abs(red->u.bitmap.stride);
> +        bitmap_size = red->u.bitmap.y * red->u.bitmap.stride;
>          if (qxl_flags & QXL_BITMAP_DIRECT) {
>              red->u.bitmap.data = red_get_image_data_flat(slots, group_id,
>                                                           qxl->bitmap.data,
> --
> 2.4.3
> 

Acked

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]