[Mesa-dev] [PATCH 04/15] glsl: Resolve GCC sign-compare warning.
Rhys Kidd
rhyskidd at gmail.com
Tue Sep 8 03:12:53 PDT 2015
mesa/src/glsl/nir/nir_search.c: In function 'match_value':
mesa/src/glsl/nir/nir_search.c:84:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < num_components; ++i)
^
Signed-off-by: Rhys Kidd <rhyskidd at gmail.com>
---
src/glsl/nir/nir_search.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/glsl/nir/nir_search.c b/src/glsl/nir/nir_search.c
index c33d6c3..a38d62e 100644
--- a/src/glsl/nir/nir_search.c
+++ b/src/glsl/nir/nir_search.c
@@ -81,7 +81,7 @@ match_value(const nir_search_value *value, nir_alu_instr *instr, unsigned src,
swizzle = identity_swizzle;
}
- for (int i = 0; i < num_components; ++i)
+ for (unsigned i = 0; i < num_components; ++i)
new_swizzle[i] = instr->src[src].swizzle[swizzle[i]];
switch (value->type) {
--
2.1.4
More information about the mesa-dev
mailing list