[Piglit] [PATCH] stencil-twoside: Check and use results of all probed pixels.

Vinson Lee vlee at freedesktop.org
Wed Jan 9 09:25:41 PST 2013


From: Vinson Lee <vinson at twitter.com>

Fixes dead assignment bugs reported by Clang Static Analyzer.

Signed-off-by: Vinson Lee <vinson at twitter.com>
---
 tests/general/stencil-twoside.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/general/stencil-twoside.c b/tests/general/stencil-twoside.c
index f6d934f..396c9a1 100644
--- a/tests/general/stencil-twoside.c
+++ b/tests/general/stencil-twoside.c
@@ -210,12 +210,12 @@ piglit_display(void)
 		piglit_draw_rect(w * 11, start_y, w, h);
 	}
 
-	pass = piglit_probe_pixel_rgb(w * 1.5, piglit_height / 2, expected);
-	pass = piglit_probe_pixel_rgb(w * 3.5, piglit_height / 2, expected);
-	pass = piglit_probe_pixel_rgb(w * 5.5, piglit_height / 2, expected);
-	pass = piglit_probe_pixel_rgb(w * 7.5, piglit_height / 2, expected);
-	pass = piglit_probe_pixel_rgb(w * 9.5, piglit_height / 2, expected);
-	pass = piglit_probe_pixel_rgb(w * 11.5, piglit_height / 2, expected);
+	pass = piglit_probe_pixel_rgb(w * 1.5, piglit_height / 2, expected) && pass;
+	pass = piglit_probe_pixel_rgb(w * 3.5, piglit_height / 2, expected) && pass;
+	pass = piglit_probe_pixel_rgb(w * 5.5, piglit_height / 2, expected) && pass;
+	pass = piglit_probe_pixel_rgb(w * 7.5, piglit_height / 2, expected) && pass;
+	pass = piglit_probe_pixel_rgb(w * 9.5, piglit_height / 2, expected) && pass;
+	pass = piglit_probe_pixel_rgb(w * 11.5, piglit_height / 2, expected) && pass;
 
 	piglit_present_results();
 
-- 
1.7.9.5



More information about the Piglit mailing list