[Piglit] [PATCH 2/2] tests: fix unused variable in gles versions of arb_viewport_array/queries

Vinson Lee vlee at freedesktop.org
Mon Oct 3 23:11:35 UTC 2016


On Fri, Sep 30, 2016 at 1:19 PM, Dylan Baker <dylan at pnwbakers.com> wrote:
> tests/spec/arb_viewport_array/queries.c: In function ‘piglit_init’:
> tests/spec/arb_viewport_array/queries.c:58:11: warning: unused variable ‘vald’
>   GLdouble vald[4] = {0.0, 0.0, 0.0, 0.0};
>
> Which is only used if compiled with OpenGL support, but not when
> compiled for GLES.
>
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>  tests/spec/arb_viewport_array/queries.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/spec/arb_viewport_array/queries.c b/tests/spec/arb_viewport_array/queries.c
> index 2b10b3a..4973931 100644
> --- a/tests/spec/arb_viewport_array/queries.c
> +++ b/tests/spec/arb_viewport_array/queries.c
> @@ -55,7 +55,9 @@ piglit_init(int argc, char **argv)
>         bool pass = true;
>         GLint maxVP;
>         GLboolean scEnabled;
> +#ifdef PIGLIT_USE_OPENGL
>         GLdouble vald[4] = {0.0, 0.0, 0.0, 0.0};
> +#endif
>         GLfloat valf[4] = {0.0, 0.0, 0.0, 0.0};
>         GLint vali[4] = {0, 0, 0, 0};
>         int i;
> --
> 2.10.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Vinson Lee <vlee at freedesktop.org>


More information about the Piglit mailing list