summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@gmail.com>2011-03-22 11:48:54 +0100
committerAlon Levy <alevy@redhat.com>2011-07-21 15:09:27 +0300
commite77fc7e8779a63cf8e10ece822192bd81e573183 (patch)
tree1f501b9601db9e74642e7ae74a2311b80fc0f2a9
parent96555db49a4a04c6796ed7d823a2856adb48bee7 (diff)
downloadspice-e77fc7e8779a63cf8e10ece822192bd81e573183.tar.gz
spice-e77fc7e8779a63cf8e10ece822192bd81e573183.tar.xz
spice-e77fc7e8779a63cf8e10ece822192bd81e573183.zip
common/pixman: remove dead assignments
They were detected using clang-static-analyzer. Don't initialize the variable to a value to override it with a different value a few lines after.
-rw-r--r--common/pixman_utils.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/common/pixman_utils.c b/common/pixman_utils.c
index bdc18c93..5daee27b 100644
--- a/common/pixman_utils.c
+++ b/common/pixman_utils.c
@@ -785,9 +785,7 @@ void spice_pixman_blit_colorkey (pixman_image_t *dest,
while (height--) {
uint8_t *d = (uint8_t *)byte_line;
- uint8_t *s = (uint8_t *)byte_line;
-
- s = (uint8_t *)src_line;
+ uint8_t *s = (uint8_t *)src_line;
for (x = 0; x < width; x++) {
uint8_t val = *s;
if (val != (uint8_t)transparent_color) {
@@ -805,9 +803,8 @@ void spice_pixman_blit_colorkey (pixman_image_t *dest,
while (height--) {
uint16_t *d = (uint16_t *)byte_line;
- uint16_t *s = (uint16_t *)byte_line;
+ uint16_t *s = (uint16_t *)src_line;
- s = (uint16_t *)src_line;
for (x = 0; x < width; x++) {
uint16_t val = *s;
if (val != (uint16_t)transparent_color) {
@@ -826,10 +823,9 @@ void spice_pixman_blit_colorkey (pixman_image_t *dest,
while (height--) {
uint32_t *d = (uint32_t *)byte_line;
- uint32_t *s = (uint32_t *)byte_line;
+ uint32_t *s = (uint32_t *)src_line;
transparent_color &= 0xffffff;
- s = (uint32_t *)src_line;
for (x = 0; x < width; x++) {
uint32_t val = *s;
if ((0xffffff & val) != transparent_color) {