mesa/st: Fix compiler warnings
authorJan Vesely <jan.vesely@rutgers.edu>
Fri, 25 Jul 2014 14:33:00 +0000 (08:33 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 4 Aug 2014 15:51:44 +0000 (09:51 -0600)
both array and index are unsigned types

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index b818139baf7b09f2ed30332188acf6588bdf6a92..293bc5c1b7dd4097b1f4ca4a11402e9e9a5d0073 100644 (file)
@@ -4334,9 +4334,8 @@ dst_register(struct st_translate *t,
       return ureg_dst_undef();
 
    case PROGRAM_TEMPORARY:
-      assert(index >= 0);
-      assert(index < (int) Elements(t->temps));
+      assert(index < Elements(t->temps));
+
       if (ureg_dst_is_undef(t->temps[index]))
          t->temps[index] = ureg_DECL_local_temporary(t->ureg);
 
@@ -4345,8 +4344,7 @@ dst_register(struct st_translate *t,
    case PROGRAM_ARRAY:
       array = index >> 16;
 
-      assert(array >= 0);
-      assert(array < (int) Elements(t->arrays));
+      assert(array < Elements(t->arrays));
 
       if (ureg_dst_is_undef(t->arrays[array]))
          t->arrays[array] = ureg_DECL_array_temporary(