[Mesa-dev] [PATCH 05/15] glsl: Resolve GCC sign-compare warning.
Rhys Kidd
rhyskidd at gmail.com
Tue Sep 8 03:12:54 PDT 2015
mesa/src/glsl/nir/nir_search.c: In function 'match_value':
mesa/src/glsl/nir/nir_search.c:110:28: 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 a38d62e..afc5c8b 100644
--- a/src/glsl/nir/nir_search.c
+++ b/src/glsl/nir/nir_search.c
@@ -107,7 +107,7 @@ match_value(const nir_search_value *value, nir_alu_instr *instr, unsigned src,
assert(!instr->src[src].abs && !instr->src[src].negate);
- for (int i = 0; i < num_components; ++i) {
+ for (unsigned i = 0; i < num_components; ++i) {
if (state->variables[var->variable].swizzle[i] != new_swizzle[i])
return false;
}
--
2.1.4
More information about the mesa-dev
mailing list