[Mesa-dev] [PATCH 11/17] glsl/tests: Fix a compiler warning about signed/unsigned loop comparison.

Eric Anholt eric at anholt.net
Sat Feb 10 16:33:04 UTC 2018


Cc: Ian Romanick <ian.d.romanick at intel.com>
Fixes: d32956935edf ("glsl: Walk a list of ir_dereference_array to mark array elements as accessed")
---
 src/compiler/glsl/tests/array_refcount_test.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/tests/array_refcount_test.cpp b/src/compiler/glsl/tests/array_refcount_test.cpp
index ecd7f46900b8..0d8f4521caed 100644
--- a/src/compiler/glsl/tests/array_refcount_test.cpp
+++ b/src/compiler/glsl/tests/array_refcount_test.cpp
@@ -628,7 +628,7 @@ TEST_F(array_refcount_test, visit_array_indexing_an_array)
 
    ir_array_refcount_entry *const entry_c = v.get_variable_entry(var_c);
 
-   for (unsigned i = 0; i < var_c->type->array_size(); i++) {
+   for (int i = 0; i < var_c->type->array_size(); i++) {
       EXPECT_EQ(true, entry_c->is_linearized_index_referenced(i)) <<
          "array c, i = " << i;
    }
-- 
2.15.0



More information about the mesa-dev mailing list