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

Matt Turner mattst88 at gmail.com
Thu Jan 10 22:18:01 PST 2013


On Thu, Jan 10, 2013 at 8:07 PM, Vinson Lee <vlee at freedesktop.org> wrote:
> Fixes dead assignment bugs reported by Clang Static Analyzer.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/general/stencil-wrap.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tests/general/stencil-wrap.c b/tests/general/stencil-wrap.c
> index 8656842..b0f9c2d 100644
> --- a/tests/general/stencil-wrap.c
> +++ b/tests/general/stencil-wrap.c
> @@ -136,11 +136,11 @@ piglit_display(void)
>         glColor3f(0.5, 0.5, 0.5);
>         piglit_draw_rect(w * 9, 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 * 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;
>
>         piglit_present_results();
>
> --
> 1.8.1

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the Piglit mailing list