[Piglit] [PATCH] arb_internalformat_query2: Remove comparison of unsigned expression < 0.

Vinson Lee vlee at freedesktop.org
Wed Apr 6 01:35:39 UTC 2016


All paths that call test_data_equal_at_index do so with an unsigned index.

Fixes clang tautological-compare warning.

common.c:880:48: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        if (index > data->params_size || index < 0) {
                                         ~~~~~ ^ ~

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/spec/arb_internalformat_query2/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/arb_internalformat_query2/common.c b/tests/spec/arb_internalformat_query2/common.c
index a50a7b7336a0..e07e2c507ba0 100644
--- a/tests/spec/arb_internalformat_query2/common.c
+++ b/tests/spec/arb_internalformat_query2/common.c
@@ -877,7 +877,7 @@ test_data_equal_at_index(test_data *data,
                         " auxiliar test data structures\n");
                 return false;
         }
-        if (index > data->params_size || index < 0) {
+        if (index > data->params_size) {
                 fprintf(stderr, "ERROR: invalid index while setting"
                         " auxiliar test data\n");
                 return false;
-- 
2.5.0



More information about the Piglit mailing list