[Mesa-dev] [PATCH 06/15] glsl: Resolve GCC sign-compare warning.
Rhys Kidd
rhyskidd at gmail.com
Tue Sep 8 03:12:55 PDT 2015
mesa/src/glsl/nir/nir_search.c: In function 'match_value':
mesa/src/glsl/nir/nir_search.c:139:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (i < num_components)
^
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 afc5c8b..51e69b0 100644
--- a/src/glsl/nir/nir_search.c
+++ b/src/glsl/nir/nir_search.c
@@ -135,7 +135,7 @@ match_value(const nir_search_value *value, nir_alu_instr *instr, unsigned src,
state->variables[var->variable].abs = false;
state->variables[var->variable].negate = false;
- for (int i = 0; i < 4; ++i) {
+ for (unsigned i = 0; i < 4; ++i) {
if (i < num_components)
state->variables[var->variable].swizzle[i] = new_swizzle[i];
else
--
2.1.4
More information about the mesa-dev
mailing list