On Wed, Jan 29, 2014 at 9:41 PM, Vinson Lee <[email protected]> wrote:

> Fixes "Unchecked return value" defects reported by Coverity.
>
> Signed-off-by: Vinson Lee <[email protected]>
> ---
>  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;
>  }
>

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.

Reviewed-by: Brian Paul <[email protected]>
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to