[Piglit] [PATCH] arb_uniform_buffer_object: Remove unsigned comparison against 0.

Brian Paul brian.e.paul at gmail.com
Sun Dec 16 08:59:59 PST 2012


On Sat, Dec 15, 2012 at 1:03 AM, Vinson Lee <vlee at freedesktop.org> wrote:
> indices[i] has type GLuint.
>
> Fixes unsigned compared against 0 defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/spec/arb_uniform_buffer_object/getuniformindices.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tests/spec/arb_uniform_buffer_object/getuniformindices.c b/tests/spec/arb_uniform_buffer_object/getuniformindices.c
> index 2c43466..b513c73 100644
> --- a/tests/spec/arb_uniform_buffer_object/getuniformindices.c
> +++ b/tests/spec/arb_uniform_buffer_object/getuniformindices.c
> @@ -119,8 +119,7 @@ piglit_init(int argc, char **argv)
>
>         for (i = 0; i < 3; i++) {
>                 printf("%s: index %d\n", uniform_names[i], indices[i]);
> -               if (indices[i] < 0 || indices[i] > 2 ||
> -                   found_index[indices[i]]) {
> +               if (indices[i] > 2 || found_index[indices[i]]) {
>                         printf("Expected consecutive numbers starting from 0\n");
>                         pass = false;
>                 }

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


More information about the Piglit mailing list