<div dir="ltr">On Wed, Jan 29, 2014 at 9:41 PM, Vinson Lee <span dir="ltr"><<a href="mailto:vlee@freedesktop.org" target="_blank">vlee@freedesktop.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Fixes "Unchecked return value" defects reported by Coverity.<br>
<br>
Signed-off-by: Vinson Lee <<a href="mailto:vlee@freedesktop.org">vlee@freedesktop.org</a>><br>
---<br>
 tests/spec/gl-3.2/depth-tex-sampling.c | 12 +++++++++---<br>
 1 file changed, 9 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/tests/spec/gl-3.2/depth-tex-sampling.c b/tests/spec/gl-3.2/depth-tex-sampling.c<br>
index a7def6c..89827ba 100644<br>
--- a/tests/spec/gl-3.2/depth-tex-sampling.c<br>
+++ b/tests/spec/gl-3.2/depth-tex-sampling.c<br>
@@ -73,7 +73,9 @@ make_depth_texture(void)<br>
                     TEX_SIZE, TEX_SIZE, 0,<br>
                     format, GL_FLOAT, texels);<br>
<br>
-       piglit_check_gl_error(GL_NO_ERROR);<br>
+       if (!piglit_check_gl_error(GL_NO_ERROR)) {<br>
+               piglit_report_result(PIGLIT_FAIL);<br>
+       }<br>
<br>
        /* this call should generate an error in the core profile */<br>
        glTexParameteri(GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE, GL_INTENSITY);<br>
@@ -124,7 +126,9 @@ make_shader_program(void)<br>
<br>
        glLinkProgram(prog);<br>
<br>
-       piglit_check_gl_error(GL_NO_ERROR);<br>
+       if (!piglit_check_gl_error(GL_NO_ERROR)) {<br>
+               piglit_report_result(PIGLIT_FAIL);<br>
+       }<br>
<br>
        return prog;<br>
 }<br>
@@ -156,7 +160,9 @@ make_vao(void)<br>
        glEnableVertexAttribArray(0);<br>
        glEnableVertexAttribArray(1);<br>
<br>
-       piglit_check_gl_error(GL_NO_ERROR);<br>
+       if (!piglit_check_gl_error(GL_NO_ERROR)) {<br>
+               piglit_report_result(PIGLIT_FAIL);<br>
+       }<br>
<br>
        return vbo;<br>
 }<br></blockquote><div><br></div><div>I think I had those calls in there just as sanity checks during development.  They could probably be dropped, but your patch is fine too.<br><br></div><div>Reviewed-by: Brian Paul <<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>><br>
 <br></div></div><br></div></div>