[PATCH 2/2] Remove duplicate assignment of repeat_type_uniform_location

Alan Coopersmith alan.coopersmith at oracle.com
Sat Mar 8 11:15:29 PST 2014


Flagged by cppcheck 1.64:
[glamor/glamor_gradient.c:987] -> [glamor/glamor_gradient.c:991]:
    (performance) Variable 'repeat_type_uniform_location' is
             reassigned a value before the old one has been used.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 glamor/glamor_gradient.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/glamor/glamor_gradient.c b/glamor/glamor_gradient.c
index 9f6f1b1..114dea6 100644
--- a/glamor/glamor_gradient.c
+++ b/glamor/glamor_gradient.c
@@ -988,8 +988,6 @@ glamor_generate_radial_gradient_picture(ScreenPtr screen,
                                                         "repeat_type");
     n_stop_uniform_location = glGetUniformLocation(gradient_prog, "n_stop");
     A_value_uniform_location = glGetUniformLocation(gradient_prog, "A_value");
-    repeat_type_uniform_location =glGetUniformLocation(gradient_prog,
-                                                       "repeat_type");
     c1_uniform_location = glGetUniformLocation(gradient_prog, "c1");
     r1_uniform_location = glGetUniformLocation(gradient_prog, "r1");
     c2_uniform_location = glGetUniformLocation(gradient_prog, "c2");
-- 
1.7.9.2



More information about the xorg-devel mailing list