nir: fix a few signed/unsigned comparison warnings
authorBrian Paul <brianp@vmware.com>
Fri, 22 Mar 2019 01:19:05 +0000 (19:19 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 25 Mar 2019 12:51:31 +0000 (06:51 -0600)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir_types.cpp

index aff575c..3bf93c5 100644 (file)
@@ -690,7 +690,7 @@ glsl_type_get_sampler_count(const struct glsl_type *type)
 
    if (glsl_type_is_struct_or_ifc(type)) {
       unsigned count = 0;
-      for (int i = 0; i < glsl_get_length(type); i++)
+      for (unsigned i = 0; i < glsl_get_length(type); i++)
          count += glsl_type_get_sampler_count(glsl_get_struct_field(type, i));
       return count;
    }
@@ -711,7 +711,7 @@ glsl_type_get_image_count(const struct glsl_type *type)
 
    if (glsl_type_is_struct_or_ifc(type)) {
       unsigned count = 0;
-      for (int i = 0; i < glsl_get_length(type); i++)
+      for (unsigned i = 0; i < glsl_get_length(type); i++)
          count += glsl_type_get_image_count(glsl_get_struct_field(type, i));
       return count;
    }