[Piglit] [PATCH] gl-3.2-depth-tex-sampling: Check return value of piglit_check_gl_error.
Vinson Lee
vlee at freedesktop.org
Wed Jan 29 20:41:55 PST 2014
Fixes "Unchecked return value" defects reported by Coverity.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
tests/spec/gl-3.2/depth-tex-sampling.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/spec/gl-3.2/depth-tex-sampling.c b/tests/spec/gl-3.2/depth-tex-sampling.c
index a7def6c..89827ba 100644
--- a/tests/spec/gl-3.2/depth-tex-sampling.c
+++ b/tests/spec/gl-3.2/depth-tex-sampling.c
@@ -73,7 +73,9 @@ make_depth_texture(void)
TEX_SIZE, TEX_SIZE, 0,
format, GL_FLOAT, texels);
- piglit_check_gl_error(GL_NO_ERROR);
+ if (!piglit_check_gl_error(GL_NO_ERROR)) {
+ piglit_report_result(PIGLIT_FAIL);
+ }
/* this call should generate an error in the core profile */
glTexParameteri(GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE, GL_INTENSITY);
@@ -124,7 +126,9 @@ make_shader_program(void)
glLinkProgram(prog);
- piglit_check_gl_error(GL_NO_ERROR);
+ if (!piglit_check_gl_error(GL_NO_ERROR)) {
+ piglit_report_result(PIGLIT_FAIL);
+ }
return prog;
}
@@ -156,7 +160,9 @@ make_vao(void)
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
- piglit_check_gl_error(GL_NO_ERROR);
+ if (!piglit_check_gl_error(GL_NO_ERROR)) {
+ piglit_report_result(PIGLIT_FAIL);
+ }
return vbo;
}
--
1.8.3.2
More information about the Piglit
mailing list