summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2014-07-25 08:33:00 -0600
committerBrian Paul <brianp@vmware.com>2014-08-04 09:51:44 -0600
commitcf3c73cf200edd6a852270d3a152340457d56333 (patch)
treea0ee2a05f34ab6c53fe79123b260ddf4e900153a
parent6614def76420ba02b76385d7fa4d1d4ad9ec91d5 (diff)
downloadexternal_mesa3d-cf3c73cf200edd6a852270d3a152340457d56333.zip
external_mesa3d-cf3c73cf200edd6a852270d3a152340457d56333.tar.gz
external_mesa3d-cf3c73cf200edd6a852270d3a152340457d56333.tar.bz2
mesa/st: Fix compiler warnings
both array and index are unsigned types Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index b818139..293bc5c 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -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(