diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-01 23:22:31 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-01 23:25:31 +0100 |
commit | 7867bff00caeff9e1fbe569ca3d37b94f704a4cd (patch) | |
tree | dd1357c9b016964c04d7b98d0407075c9d5f6644 | |
parent | ca72b372237287af0f4475801a9b64efca975832 (diff) |
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>
-rw-r--r-- | src/sna/gen4_render.c | 4 | ||||
-rw-r--r-- | src/sna/gen5_render.c | 4 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 4 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index 553cea87..f982b41f 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -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)) diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index 8b970f4f..56db4a00 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -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)) diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index df2eeb2e..cc6cc508 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -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)) diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 6bf25d32..2ee5b6f6 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -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)) |