[Piglit] [PATCH] arb_get_program_binary: Check piglit_check_gl_error results.

Vinson Lee vlee at freedesktop.org
Thu Jan 8 15:24:11 PST 2015


Fix dead assignment bugs reported by Clang Static Analyzer.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/spec/arb_get_program_binary/retrievable_hint.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/spec/arb_get_program_binary/retrievable_hint.c b/tests/spec/arb_get_program_binary/retrievable_hint.c
index 2cea633..8283c5b 100644
--- a/tests/spec/arb_get_program_binary/retrievable_hint.c
+++ b/tests/spec/arb_get_program_binary/retrievable_hint.c
@@ -111,10 +111,10 @@ piglit_init(int argc, char **argv)
 	 */
 
 	glProgramParameteri(prog, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, GL_TRUE);
-	got_error = piglit_check_gl_error(0);
+	pass = piglit_check_gl_error(0) && pass;
 
 	glGetProgramiv(prog, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, &value);
-	got_error = piglit_check_gl_error(0);
+	pass = piglit_check_gl_error(0) && pass;
 
 	if (value != 0) {
 		fprintf(stderr,
@@ -124,10 +124,10 @@ piglit_init(int argc, char **argv)
 	}
 
 	glLinkProgram(prog);
-	got_error = piglit_check_gl_error(0);
+	pass = piglit_check_gl_error(0) && pass;
 
 	glGetProgramiv(prog, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, &value);
-	got_error = piglit_check_gl_error(0);
+	pass = piglit_check_gl_error(0) && pass;
 
 	if (value != GL_TRUE) {
 		fprintf(stderr,
-- 
2.1.0



More information about the Piglit mailing list