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

Chad Versace chad.versace at intel.com
Tue Jan 13 16:04:21 PST 2015


On 01/08/2015 03:24 PM, Vinson Lee wrote:
> 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,

Reviewed-by: Chad Versace <chad.versace at intel.com>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150113/aa580a42/attachment.sig>


More information about the Piglit mailing list