glsl: fix new gcc6 warnings
authorRob Clark <robdclark@gmail.com>
Tue, 16 Feb 2016 18:31:27 +0000 (13:31 -0500)
committerRob Clark <robclark@freedesktop.org>
Thu, 18 Feb 2016 22:10:55 +0000 (17:10 -0500)
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)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~

The base class method that was intended to be overridden was
'visit(ir_loop_jump *ir)', not visit_enter().

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/glsl/lower_discard_flow.cpp

index 9d0a56b230d9bfba6f58b6b09a853ad7f7f494e6..9e3a7c055831e2dfe55de801f3373764a24d9c12 100644 (file)
@@ -62,8 +62,8 @@ public:
    {
    }
 
+   ir_visitor_status visit(ir_loop_jump *ir);
    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,7 +76,7 @@ public:
 } /* anonymous namespace */
 
 ir_visitor_status
-lower_discard_flow_visitor::visit_enter(ir_loop_jump *ir)
+lower_discard_flow_visitor::visit(ir_loop_jump *ir)
 {
    if (ir->mode != ir_loop_jump::jump_continue)
       return visit_continue;