[Spice-commits] server/red_parse_qxl.c
Christophe Fergau
teuf at kemper.freedesktop.org
Wed Aug 12 03:34:40 PDT 2015
server/red_parse_qxl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 94e55bce423a5d3023097552ca50151109e2ddf1
Author: Victor Toso <victortoso at redhat.com>
Date: Wed Aug 5 14:23:19 2015 +0200
red_parse_qxl: Do not compute abs unsigned int
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);
^
diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
index cc1e6f3..5b1befa 100644
--- a/server/red_parse_qxl.c
+++ b/server/red_parse_qxl.c
@@ -445,7 +445,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,
More information about the Spice-commits
mailing list