sna: Replace invalid signed value with unsigned ~0 for uint8_t

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-06-01 23:22:31 +01:00
parent ca72b37223
commit 7867bff00c
4 changed files with 8 additions and 8 deletions

View File

@ -2916,7 +2916,7 @@ gen4_render_fill_boxes(struct sna *sna,
(prefer_blt(sna) ||
too_large(dst->drawable.width, dst->drawable.height) ||
!gen4_check_dst_format(format))) {
uint8_t alu = -1;
uint8_t alu = ~0;
pixel = 0;
if (op == PictOpClear)
@ -2929,7 +2929,7 @@ gen4_render_fill_boxes(struct sna *sna,
format))
alu = GXcopy;
if (alu != -1 &&
if (alu != ~0 &&
sna_blt_fill_boxes(sna, alu,
dst_bo, dst->drawable.bitsPerPixel,
pixel, box, n))

View File

@ -3250,7 +3250,7 @@ gen5_render_fill_boxes(struct sna *sna,
(prefer_blt_fill(sna) ||
too_large(dst->drawable.width, dst->drawable.height) ||
!gen5_check_dst_format(format))) {
uint8_t alu = -1;
uint8_t alu = ~0;
pixel = 0;
if (op == PictOpClear)
@ -3263,7 +3263,7 @@ gen5_render_fill_boxes(struct sna *sna,
format))
alu = GXcopy;
if (alu != -1 &&
if (alu != ~0 &&
sna_blt_fill_boxes(sna, alu,
dst_bo, dst->drawable.bitsPerPixel,
pixel, box, n))

View File

@ -3661,7 +3661,7 @@ gen6_render_fill_boxes(struct sna *sna,
(prefer_blt_fill(sna, dst_bo) ||
too_large(dst->drawable.width, dst->drawable.height) ||
!gen6_check_dst_format(format))) {
uint8_t alu = -1;
uint8_t alu = ~0;
pixel = 0;
if (op == PictOpClear)
@ -3674,7 +3674,7 @@ gen6_render_fill_boxes(struct sna *sna,
format))
alu = GXcopy;
if (alu != -1 &&
if (alu != ~0 &&
sna_blt_fill_boxes(sna, alu,
dst_bo, dst->drawable.bitsPerPixel,
pixel, box, n))

View File

@ -3743,7 +3743,7 @@ gen7_render_fill_boxes(struct sna *sna,
(prefer_blt_fill(sna, dst_bo) ||
too_large(dst->drawable.width, dst->drawable.height) ||
!gen7_check_dst_format(format))) {
uint8_t alu = -1;
uint8_t alu = ~0;
pixel = 0;
if (op == PictOpClear)
@ -3756,7 +3756,7 @@ gen7_render_fill_boxes(struct sna *sna,
format))
alu = GXcopy;
if (alu != -1 &&
if (alu != ~0 &&
sna_blt_fill_boxes(sna, alu,
dst_bo, dst->drawable.bitsPerPixel,
pixel, box, n))