From 1c194840fda7b1a6344aa40def9879b418fa977d Mon Sep 17 00:00:00 2001 From: Rhys Kidd Date: Tue, 8 Sep 2015 23:52:49 +0800 Subject: [PATCH] mesa: Resolve GCC sign-compare warning. mesa/src/mesa/program/prog_to_nir.c: In function 'setup_registers_and_variables': /mesa/src/mesa/program/prog_to_nir.c:1059:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < c->prog->NumTemporaries; i++) { ^ Signed-off-by: Rhys Kidd Reviewed-by: Thomas Helland Reviewed-by: Jan Vesely Reviewed-by: Emil Velikov --- src/mesa/program/prog_to_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c index fccd16fc8c0..ec61100356a 100644 --- a/src/mesa/program/prog_to_nir.c +++ b/src/mesa/program/prog_to_nir.c @@ -1056,7 +1056,7 @@ setup_registers_and_variables(struct ptn_compile *c) c->temp_regs = rzalloc_array(c, nir_register *, c->prog->NumTemporaries); nir_register *reg; - for (int i = 0; i < c->prog->NumTemporaries; i++) { + for (unsigned i = 0; i < c->prog->NumTemporaries; i++) { reg = nir_local_reg_create(b->impl); if (!reg) { c->error = true; -- 2.30.2