summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2010-03-30 08:55:17 -0400
committerZack Rusin <[email protected]>2010-03-30 08:55:17 -0400
commitdc886ba1391d7d890bd1f5532bc14553e883a418 (patch)
tree77872d5480194681a8c35bf31afbe64cfbb479b0 /src
parent5cc9387d0de966e855794d3108b31737a6dfc13a (diff)
gallivm: cleanup the code (found by coverity)
the condition can't be false, declerations are ok even if we don't emit any.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 95cd6a0ecf3..8901e656aed 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -666,30 +666,20 @@ emit_declaration(
first_inst);
for (idx = first; idx <= last; ++idx) {
- boolean ok;
-
switch (decl->Declaration.File) {
case TGSI_FILE_TEMPORARY:
for (i = 0; i < NUM_CHANNELS; i++)
bld->temps[idx][i] = lp_build_alloca(&bld->base);
- ok = TRUE;
break;
case TGSI_FILE_OUTPUT:
for (i = 0; i < NUM_CHANNELS; i++)
bld->outputs[idx][i] = lp_build_alloca(&bld->base);
- ok = TRUE;
break;
default:
/* don't need to declare other vars */
- ok = TRUE;
- }
-
- if (!ok) {
- LLVMPositionBuilderAtEnd(bld->base.builder,
- current_block);
- return FALSE;
+ break;
}
}