[Piglit] [PATCH] arb_shader_atomic_counters: Check piglit_probe_pixel_rgb results.

Brian Paul brianp at vmware.com
Thu Jan 8 14:57:56 PST 2015


On 01/08/2015 03:53 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_shader_atomic_counters/respecify-buffer.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tests/spec/arb_shader_atomic_counters/respecify-buffer.c b/tests/spec/arb_shader_atomic_counters/respecify-buffer.c
> index c932e3e..ba0237a 100644
> --- a/tests/spec/arb_shader_atomic_counters/respecify-buffer.c
> +++ b/tests/spec/arb_shader_atomic_counters/respecify-buffer.c
> @@ -50,7 +50,7 @@ float white[] = { 1, 1, 1 };
>   enum piglit_result
>   piglit_display(void)
>   {
> -	bool pass = true;
> +	bool pass;
>   	int i;
>
>   	glViewport(0, 0, piglit_width, piglit_height);
> @@ -69,11 +69,11 @@ piglit_display(void)
>   	pass = piglit_probe_pixel_rgb(piglit_width / 4,
>   				      piglit_height / 4, red);
>   	pass = piglit_probe_pixel_rgb(3 * piglit_width / 4,
> -				      piglit_height / 4, green);
> +				      piglit_height / 4, green) && pass;
>   	pass = piglit_probe_pixel_rgb(piglit_width / 4,
> -				      3 * piglit_height / 4, blue);
> +				      3 * piglit_height / 4, blue) && pass;
>   	pass = piglit_probe_pixel_rgb(3 * piglit_width / 4,
> -				      3 * piglit_height / 4, white);
> +				      3 * piglit_height / 4, white) && pass;
>
>   	piglit_present_results();
>
>

Reviewed-by: Brian Paul <brianp at vmware.com>




More information about the Piglit mailing list