[Mesa-dev] [PATCH 02/15] glsl: Resolve GCC sign-compare warning.
Rhys Kidd
rhyskidd at gmail.com
Tue Sep 8 03:12:51 PDT 2015
mesa/src/glsl/nir/nir_lower_tex_projector.c: In function 'nir_lower_tex_projector_block':
mesa/src/glsl/nir/nir_lower_tex_projector.c:114:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = proj_index + 1; i < tex->num_srcs; i++) {
^
Signed-off-by: Rhys Kidd <rhyskidd at gmail.com>
---
src/glsl/nir/nir_lower_tex_projector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/glsl/nir/nir_lower_tex_projector.c b/src/glsl/nir/nir_lower_tex_projector.c
index 19f1bbd..3ad3450 100644
--- a/src/glsl/nir/nir_lower_tex_projector.c
+++ b/src/glsl/nir/nir_lower_tex_projector.c
@@ -111,7 +111,7 @@ nir_lower_tex_projector_block(nir_block *block, void *void_state)
*/
nir_instr_rewrite_src(&tex->instr, &tex->src[proj_index].src,
NIR_SRC_INIT);
- for (int i = proj_index + 1; i < tex->num_srcs; i++) {
+ for (unsigned i = proj_index + 1; i < tex->num_srcs; i++) {
tex->src[i-1].src_type = tex->src[i].src_type;
nir_instr_move_src(&tex->instr, &tex->src[i-1].src, &tex->src[i].src);
}
--
2.1.4
More information about the mesa-dev
mailing list