[Piglit] [PATCH] gl-4.5: Fix tautological-compare warning.

Antía Puentes apuentes at igalia.com
Tue Feb 14 14:18:04 UTC 2017


Reviewed-by: Antia Puentes <apuentes at igalia.com>

On mar, 2017-02-14 at 01:07 +0000, Vinson Lee wrote:
> compare-framebuffer-parameter-with-get.c:160:25: warning: comparison
> of unsigned expression < 0 is always false [-Wtautological-compare]
>         if (global_framebuffer < 0 || global_framebuffer > 2) {
>             ~~~~~~~~~~~~~~~~~~ ^ ~
> 
> Fixes: d60f1fb839bc ("gl-4.5/compare-framebuffer-parameter-with-get:
> add test")
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/spec/gl-4.5/compare-framebuffer-parameter-with-get.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/spec/gl-4.5/compare-framebuffer-parameter-with-
> get.c b/tests/spec/gl-4.5/compare-framebuffer-parameter-with-get.c
> index 5573d9838c1b..45ddbce0f05c 100644
> --- a/tests/spec/gl-4.5/compare-framebuffer-parameter-with-get.c
> +++ b/tests/spec/gl-4.5/compare-framebuffer-parameter-with-get.c
> @@ -94,7 +94,7 @@ GLuint framebuffers[3];
>  bool filter_pname = false;
>  GLenum global_pname;
>  bool filter_framebuffer = false;
> -GLuint global_framebuffer;
> +int global_framebuffer;
>  
>  /*
>   * Returns if any of the table_23_73 enums is a boolean or not


More information about the Piglit mailing list