[Piglit] [PATCH] stencil-twoside: Check and use results of all probed pixels.

Brian Paul brianp at vmware.com
Wed Jan 9 09:31:51 PST 2013


On 01/09/2013 09:25 AM, Vinson Lee wrote:
> From: Vinson Lee<vinson at twitter.com>
>
> Fixes dead assignment bugs reported by Clang Static Analyzer.
>
> Signed-off-by: Vinson Lee<vinson at twitter.com>
> ---
>   tests/general/stencil-twoside.c |   12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tests/general/stencil-twoside.c b/tests/general/stencil-twoside.c
> index f6d934f..396c9a1 100644
> --- a/tests/general/stencil-twoside.c
> +++ b/tests/general/stencil-twoside.c
> @@ -210,12 +210,12 @@ piglit_display(void)
>   		piglit_draw_rect(w * 11, start_y, w, h);
>   	}
>
> -	pass = piglit_probe_pixel_rgb(w * 1.5, piglit_height / 2, expected);
> -	pass = piglit_probe_pixel_rgb(w * 3.5, piglit_height / 2, expected);
> -	pass = piglit_probe_pixel_rgb(w * 5.5, piglit_height / 2, expected);
> -	pass = piglit_probe_pixel_rgb(w * 7.5, piglit_height / 2, expected);
> -	pass = piglit_probe_pixel_rgb(w * 9.5, piglit_height / 2, expected);
> -	pass = piglit_probe_pixel_rgb(w * 11.5, piglit_height / 2, expected);
> +	pass = piglit_probe_pixel_rgb(w * 1.5, piglit_height / 2, expected)&&  pass;
> +	pass = piglit_probe_pixel_rgb(w * 3.5, piglit_height / 2, expected)&&  pass;
> +	pass = piglit_probe_pixel_rgb(w * 5.5, piglit_height / 2, expected)&&  pass;
> +	pass = piglit_probe_pixel_rgb(w * 7.5, piglit_height / 2, expected)&&  pass;
> +	pass = piglit_probe_pixel_rgb(w * 9.5, piglit_height / 2, expected)&&  pass;
> +	pass = piglit_probe_pixel_rgb(w * 11.5, piglit_height / 2, expected)&&  pass;
>
>   	piglit_present_results();
>

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


More information about the Piglit mailing list