Mesa (master): glsl/tests: Fix a compiler warning about signed/unsigned loop comparison.

Eric Anholt anholt at kemper.freedesktop.org
Wed Feb 21 04:25:44 UTC 2018


Module: Mesa
Branch: master
Commit: 4636ce362d4defc70a2b40cab1f52d1c890f5673
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4636ce362d4defc70a2b40cab1f52d1c890f5673

Author: Eric Anholt <eric at anholt.net>
Date:   Sat Feb 10 11:03:38 2018 +0000

glsl/tests: Fix a compiler warning about signed/unsigned loop comparison.

Fixes: d32956935edf ("glsl: Walk a list of ir_dereference_array to mark array elements as accessed")
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 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 ecd7f46900..0d8f4521ca 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;
    }




More information about the mesa-commit mailing list