[Piglit] [PATCH] arb_separate_shader_objects: Check piglit_link_check_status results.
Dylan Baker
dylan at pnwbakers.com
Tue Aug 29 16:52:10 UTC 2017
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Quoting Vinson Lee (2017-08-28 15:35:23)
> Fix Coverity unchecked return value defects.
>
> CID: 743618
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> .../spec/arb_separate_shader_objects/rendezvous_by_location.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c b/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c
> index a3e37c03d8ac..c9c673a5413d 100644
> --- a/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c
> +++ b/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c
> @@ -142,6 +142,7 @@ void piglit_init(int argc, char **argv)
> GLuint fs_prog_same_declaration_order;
> GLuint fs_prog_same_location_order;
> char *source;
> + bool pass = true;
>
> piglit_require_vertex_shader();
> piglit_require_fragment_shader();
> @@ -153,21 +154,21 @@ void piglit_init(int argc, char **argv)
> (void)!asprintf(&source, vs_code_template, glsl_version);
> vs_prog = glCreateShaderProgramv(GL_VERTEX_SHADER, 1,
> (const GLchar *const *) &source);
> - piglit_link_check_status(vs_prog);
> + pass = piglit_link_check_status(vs_prog) && pass;
> free(source);
>
> (void)!asprintf(&source, fs_code_same_declaration_order_template, glsl_version);
> fs_prog_same_declaration_order =
> glCreateShaderProgramv(GL_FRAGMENT_SHADER, 1,
> (const GLchar *const *) &source);
> - piglit_link_check_status(fs_prog_same_declaration_order);
> + pass = piglit_link_check_status(fs_prog_same_declaration_order) && pass;
> free(source);
>
> (void)!asprintf(&source, fs_code_same_location_order_template, glsl_version);
> fs_prog_same_location_order =
> glCreateShaderProgramv(GL_FRAGMENT_SHADER, 1,
> (const GLchar *const *) &source);
> - piglit_link_check_status(fs_prog_same_location_order);
> + pass = piglit_link_check_status(fs_prog_same_location_order) && pass;
> free(source);
>
> glGenProgramPipelines(1, &pipeline_same_declaration_order);
> @@ -188,6 +189,7 @@ void piglit_init(int argc, char **argv)
> fs_prog_same_location_order);
> piglit_program_pipeline_check_status(pipeline_same_location_order);
>
> - if (!piglit_check_gl_error(0))
> + pass = piglit_check_gl_error(0) && pass;
> + if (!pass)
> piglit_report_result(PIGLIT_FAIL);
> }
> --
> 2.11.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20170829/31ffa566/attachment.sig>
More information about the Piglit
mailing list