summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@gmail.com>2011-03-22 11:48:54 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2011-04-08 12:14:19 +0200
commit086d6fded69b323af0a14276f4b5e9454094dad0 (patch)
tree4370bb613fddff7d1460d86d4fc7fac0435158ee /common
parent3ba093a57e5283b3b630a30182cb770e62fc93a9 (diff)
downloadspice-086d6fded69b323af0a14276f4b5e9454094dad0.tar.gz
spice-086d6fded69b323af0a14276f4b5e9454094dad0.tar.xz
spice-086d6fded69b323af0a14276f4b5e9454094dad0.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.
Diffstat (limited to 'common')
-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) {