[Mesa-dev] [PATCH 08/10] glsl: fix new gcc6 warnings

Rob Clark robdclark at gmail.com
Tue Feb 16 18:58:04 UTC 2016


src/compiler/glsl/lower_discard_flow.cpp:79:1: warning: ‘ir_visitor_status {anonymous}::lower_discard_flow_visitor::visit_enter(ir_loop_jump*)’ defined but not used [-Wunused-function]
 lower_discard_flow_visitor::visit_enter(ir_loop_jump *ir)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~

Note, not sure if this was a latent bug?  Could be that was intended to
override visit(ir_loop_jump *)?

Signed-off-by: Rob Clark <robdclark at gmail.com>
---
 src/compiler/glsl/lower_discard_flow.cpp | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/src/compiler/glsl/lower_discard_flow.cpp b/src/compiler/glsl/lower_discard_flow.cpp
index 9d0a56b..bdb96b4 100644
--- a/src/compiler/glsl/lower_discard_flow.cpp
+++ b/src/compiler/glsl/lower_discard_flow.cpp
@@ -63,7 +63,6 @@ public:
    }
 
    ir_visitor_status visit_enter(ir_discard *ir);
-   ir_visitor_status visit_enter(ir_loop_jump *ir);
    ir_visitor_status visit_enter(ir_loop *ir);
    ir_visitor_status visit_enter(ir_function_signature *ir);
 
@@ -76,17 +75,6 @@ public:
 } /* anonymous namespace */
 
 ir_visitor_status
-lower_discard_flow_visitor::visit_enter(ir_loop_jump *ir)
-{
-   if (ir->mode != ir_loop_jump::jump_continue)
-      return visit_continue;
-
-   ir->insert_before(generate_discard_break());
-
-   return visit_continue;
-}
-
-ir_visitor_status
 lower_discard_flow_visitor::visit_enter(ir_discard *ir)
 {
    ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(discarded);
-- 
2.5.0



More information about the mesa-dev mailing list