glsl: fix signed/unsigned comparison warning
authorBrian Paul <brianp@vmware.com>
Fri, 11 Oct 2013 15:20:56 +0000 (09:20 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 11 Oct 2013 23:07:44 +0000 (17:07 -0600)
src/glsl/ir_validate.cpp

index 7bc712236f4e49ce504b502a37ffdeb353dd5b81..13e41a0890142029a6cb6fa8bc88966b293fc81a 100644 (file)
@@ -694,7 +694,7 @@ ir_validate::visit(ir_variable *ir)
    if (ir->is_interface_instance()) {
       const glsl_struct_field *fields =
          ir->get_interface_type()->fields.structure;
-      for (int i = 0; i < ir->get_interface_type()->length; i++) {
+      for (unsigned i = 0; i < ir->get_interface_type()->length; i++) {
          if (fields[i].type->array_size() > 0) {
             if (ir->max_ifc_array_access[i] >= fields[i].type->length) {
                printf("ir_variable has maximum access out of bounds for "