Mesa (master): st/mesa: remove unused-but-set variables in st_glsl_to_tgsi. cpp

Marek Olšák mareko at kemper.freedesktop.org
Thu Aug 4 22:11:41 PDT 2011


Module: Mesa
Branch: master
Commit: 6e7942936c5de59f509779b6f7620d80d2fbc21a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e7942936c5de59f509779b6f7620d80d2fbc21a

Author: Marek Olšák <maraeo at gmail.com>
Date:   Fri Aug  5 06:57:07 2011 +0200

st/mesa: remove unused-but-set variables in st_glsl_to_tgsi.cpp

---

 src/mesa/state_tracker/st_glsl_to_tgsi.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 9c6a7ed..460bafb 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -1725,7 +1725,6 @@ glsl_to_tgsi_visitor::visit(ir_dereference_array *ir)
    if (index) {
       src.index += index->value.i[0] * element_size;
    } else {
-      st_src_reg array_base = this->result;
       /* Variable index array dereference.  It eats the "vec4" of the
        * base of the array and an index that offsets the TGSI register
        * index.
@@ -2463,7 +2462,7 @@ glsl_to_tgsi_visitor::visit(ir_discard *ir)
 void
 glsl_to_tgsi_visitor::visit(ir_if *ir)
 {
-   glsl_to_tgsi_instruction *cond_inst, *if_inst, *else_inst = NULL;
+   glsl_to_tgsi_instruction *cond_inst, *if_inst;
    glsl_to_tgsi_instruction *prev_inst;
 
    prev_inst = (glsl_to_tgsi_instruction *)this->instructions.get_tail();
@@ -2495,7 +2494,7 @@ glsl_to_tgsi_visitor::visit(ir_if *ir)
    visit_exec_list(&ir->then_instructions, this);
 
    if (!ir->else_instructions.is_empty()) {
-      else_inst = emit(ir->condition, TGSI_OPCODE_ELSE);
+      emit(ir->condition, TGSI_OPCODE_ELSE);
       visit_exec_list(&ir->else_instructions, this);
    }
 



More information about the mesa-commit mailing list