Fix "variable was set but never used" warnings
authorRolland Dudemaine <rolland@ghs.com>
Tue, 25 Jan 2011 13:08:26 +0000 (15:08 +0200)
committerSiarhei Siamashka <siarhei.siamashka@nokia.com>
Wed, 26 Jan 2011 13:05:24 +0000 (15:05 +0200)
Removes useless variable declarations. This can only result in more
efficient code, as these variables where sometimes assigned, but
their values were never used.

pixman/pixman-fast-path.c
pixman/pixman-matrix.c
pixman/pixman-trap.c

index 868175f..2f9f176 100644 (file)
@@ -364,7 +364,7 @@ fast_composite_add_n_8888_8888_ca (pixman_implementation_t *imp,
                                   int32_t                  width,
                                   int32_t                  height)
 {
-    uint32_t src, srca, s;
+    uint32_t src, s;
     uint32_t    *dst_line, *dst, d;
     uint32_t    *mask_line, *mask, ma;
     int dst_stride, mask_stride;
@@ -372,7 +372,6 @@ fast_composite_add_n_8888_8888_ca (pixman_implementation_t *imp,
 
     src = _pixman_image_get_solid (imp, src_image, dst_image->bits.format);
 
-    srca = src >> 24;
     if (src == 0)
        return;
 
index f2f67ab..8d0d973 100644 (file)
@@ -465,9 +465,6 @@ pixman_transform_from_pixman_f_transform (struct pixman_transform *        t,
     return TRUE;
 }
 
-static const int a[3] = { 3, 3, 2 };
-static const int b[3] = { 2, 1, 1 };
-
 PIXMAN_EXPORT pixman_bool_t
 pixman_f_transform_invert (struct pixman_f_transform *      dst,
                            const struct pixman_f_transform *src)
index 8353992..742911c 100644 (file)
@@ -235,7 +235,6 @@ pixman_add_traps (pixman_image_t * image,
                   pixman_trap_t *  traps)
 {
     int bpp;
-    int width;
     int height;
 
     pixman_fixed_t x_off_fixed;
@@ -245,7 +244,6 @@ pixman_add_traps (pixman_image_t * image,
 
     _pixman_image_validate (image);
     
-    width = image->bits.width;
     height = image->bits.height;
     bpp = PIXMAN_FORMAT_BPP (image->bits.format);
 
@@ -349,10 +347,8 @@ pixman_rasterize_trapezoid (pixman_image_t *          image,
                             int                       y_off)
 {
     int bpp;
-    int width;
     int height;
 
-    pixman_fixed_t x_off_fixed;
     pixman_fixed_t y_off_fixed;
     pixman_edge_t l, r;
     pixman_fixed_t t, b;
@@ -364,11 +360,9 @@ pixman_rasterize_trapezoid (pixman_image_t *          image,
     if (!pixman_trapezoid_valid (trap))
        return;
 
-    width = image->bits.width;
     height = image->bits.height;
     bpp = PIXMAN_FORMAT_BPP (image->bits.format);
 
-    x_off_fixed = pixman_int_to_fixed (x_off);
     y_off_fixed = pixman_int_to_fixed (y_off);
 
     t = trap->top + y_off_fixed;