From 4047263cb15e89d23cb145c74fb3f303904e8f14 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 27 Mar 2014 14:17:53 -0700 Subject: [PATCH] glsl: Clean up "unused parameter" warnings ../../src/glsl/builtin_functions.cpp:72:1: warning: unused parameter 'state' [-Wunused-parameter] ../../src/glsl/ir_clone.cpp:31:1: warning: unused parameter 'ht' [-Wunused-parameter] ../../src/glsl/ir_equals.cpp:44:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/ir_equals.cpp:50:1: warning: unused parameter 'ignore' [-Wunused-parameter] ../../src/glsl/ir_equals.cpp:68:1: warning: unused parameter 'ignore' [-Wunused-parameter] ../../src/glsl/ir_print_visitor.cpp:149:6: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/ir_print_visitor.cpp:556:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/ir_print_visitor.cpp:562:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/link_uniforms.cpp:213:1: warning: unused parameter 'record_type' [-Wunused-parameter] ../../src/glsl/loop_analysis.cpp:225:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/loop_unroll.cpp:73:30: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/loop_unroll.cpp:79:30: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/loop_unroll.cpp:85:30: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/opt_copy_propagation_elements.cpp:189:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/opt_cse.cpp:402:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/opt_dead_code_local.cpp:117:30: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/opt_redundant_jumps.cpp:53:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/opt_vectorize.cpp:301:1: warning: unused parameter 'ir' [-Wunused-parameter] Signed-off-by: Ian Romanick Reviewed-by: Kenneth Graunke --- src/glsl/builtin_functions.cpp | 2 +- src/glsl/ir_clone.cpp | 2 +- src/glsl/ir_equals.cpp | 6 +++--- src/glsl/ir_print_visitor.cpp | 6 +++--- src/glsl/link_uniforms.cpp | 2 +- src/glsl/loop_analysis.cpp | 2 +- src/glsl/loop_unroll.cpp | 6 +++--- src/glsl/opt_copy_propagation_elements.cpp | 2 +- src/glsl/opt_cse.cpp | 2 +- src/glsl/opt_dead_code_local.cpp | 2 +- src/glsl/opt_redundant_jumps.cpp | 2 +- src/glsl/opt_vectorize.cpp | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index 0e46b53e168..26ea9231f73 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl/builtin_functions.cpp @@ -69,7 +69,7 @@ using namespace ir_builder; * @{ */ static bool -always_available(const _mesa_glsl_parse_state *state) +always_available(const _mesa_glsl_parse_state *) { return true; } diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index 167b80c9fef..c00adc5643f 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -28,7 +28,7 @@ #include "program/hash_table.h" ir_rvalue * -ir_rvalue::clone(void *mem_ctx, struct hash_table *ht) const +ir_rvalue::clone(void *mem_ctx, struct hash_table *) const { /* The only possible instantiation is the generic error value. */ return error_value(mem_ctx); diff --git a/src/glsl/ir_equals.cpp b/src/glsl/ir_equals.cpp index 48453001942..65376cd943b 100644 --- a/src/glsl/ir_equals.cpp +++ b/src/glsl/ir_equals.cpp @@ -41,13 +41,13 @@ possibly_null_equals(ir_instruction *a, ir_instruction *b, enum ir_node_type ign * about. */ bool -ir_instruction::equals(ir_instruction *ir, enum ir_node_type) +ir_instruction::equals(ir_instruction *, enum ir_node_type) { return false; } bool -ir_constant::equals(ir_instruction *ir, enum ir_node_type ignore) +ir_constant::equals(ir_instruction *ir, enum ir_node_type) { const ir_constant *other = ir->as_constant(); if (!other) @@ -65,7 +65,7 @@ ir_constant::equals(ir_instruction *ir, enum ir_node_type ignore) } bool -ir_dereference_variable::equals(ir_instruction *ir, enum ir_node_type ignore) +ir_dereference_variable::equals(ir_instruction *ir, enum ir_node_type) { const ir_dereference_variable *other = ir->as_dereference_variable(); if (!other) diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index c7786ba9fb8..6f370b9711d 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -146,7 +146,7 @@ print_type(FILE *f, const glsl_type *t) } } -void ir_print_visitor::visit(ir_rvalue *ir) +void ir_print_visitor::visit(ir_rvalue *) { fprintf(f, "error"); } @@ -553,13 +553,13 @@ ir_print_visitor::visit(ir_loop_jump *ir) } void -ir_print_visitor::visit(ir_emit_vertex *ir) +ir_print_visitor::visit(ir_emit_vertex *) { fprintf(f, "(emit-vertex)"); } void -ir_print_visitor::visit(ir_end_primitive *ir) +ir_print_visitor::visit(ir_end_primitive *) { fprintf(f, "(end-primitive)"); } diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 3fedf313cbd..29dc0b1966c 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -212,7 +212,7 @@ program_resource_visitor::recursion(const glsl_type *t, char **name, void program_resource_visitor::visit_field(const glsl_type *type, const char *name, bool row_major, - const glsl_type *record_type) + const glsl_type *) { visit_field(type, name, row_major); } diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp index fd2b6c92368..d6a9ac77560 100644 --- a/src/glsl/loop_analysis.cpp +++ b/src/glsl/loop_analysis.cpp @@ -222,7 +222,7 @@ loop_analysis::visit(ir_loop_jump *ir) ir_visitor_status -loop_analysis::visit_enter(ir_call *ir) +loop_analysis::visit_enter(ir_call *) { /* Mark every loop that we're currently analyzing as containing an ir_call * (even those at outer nesting levels). diff --git a/src/glsl/loop_unroll.cpp b/src/glsl/loop_unroll.cpp index 6eced17365b..789655ebd00 100644 --- a/src/glsl/loop_unroll.cpp +++ b/src/glsl/loop_unroll.cpp @@ -70,19 +70,19 @@ public: run(list); } - virtual ir_visitor_status visit_enter(ir_assignment *ir) + virtual ir_visitor_status visit_enter(ir_assignment *) { nodes++; return visit_continue; } - virtual ir_visitor_status visit_enter(ir_expression *ir) + virtual ir_visitor_status visit_enter(ir_expression *) { nodes++; return visit_continue; } - virtual ir_visitor_status visit_enter(ir_loop *ir) + virtual ir_visitor_status visit_enter(ir_loop *) { fail = true; return visit_continue; diff --git a/src/glsl/opt_copy_propagation_elements.cpp b/src/glsl/opt_copy_propagation_elements.cpp index cc53e0dd00e..4d8f476a89c 100644 --- a/src/glsl/opt_copy_propagation_elements.cpp +++ b/src/glsl/opt_copy_propagation_elements.cpp @@ -186,7 +186,7 @@ ir_copy_propagation_elements_visitor::visit_leave(ir_assignment *ir) } ir_visitor_status -ir_copy_propagation_elements_visitor::visit_leave(ir_swizzle *ir) +ir_copy_propagation_elements_visitor::visit_leave(ir_swizzle *) { /* Don't visit the values of swizzles since they are handled while * visiting the swizzle itself. diff --git a/src/glsl/opt_cse.cpp b/src/glsl/opt_cse.cpp index a2b63ee99ba..1b8782bcb2b 100644 --- a/src/glsl/opt_cse.cpp +++ b/src/glsl/opt_cse.cpp @@ -399,7 +399,7 @@ cse_visitor::visit_enter(ir_loop *ir) } ir_visitor_status -cse_visitor::visit_enter(ir_call *ir) +cse_visitor::visit_enter(ir_call *) { /* Because call is an exec_list of ir_rvalues, handle_rvalue gets passed a * pointer to the (ir_rvalue *) on the stack. Since we save those pointers diff --git a/src/glsl/opt_dead_code_local.cpp b/src/glsl/opt_dead_code_local.cpp index 0c5c684a4a9..c27c526f9f9 100644 --- a/src/glsl/opt_dead_code_local.cpp +++ b/src/glsl/opt_dead_code_local.cpp @@ -114,7 +114,7 @@ public: return visit_continue_with_parent; } - virtual ir_visitor_status visit(ir_emit_vertex *ir) + virtual ir_visitor_status visit(ir_emit_vertex *) { /* For the purpose of dead code elimination, emitting a vertex counts as * "reading" all of the currently assigned output variables. diff --git a/src/glsl/opt_redundant_jumps.cpp b/src/glsl/opt_redundant_jumps.cpp index 8606dcbb71d..ee384d0f23c 100644 --- a/src/glsl/opt_redundant_jumps.cpp +++ b/src/glsl/opt_redundant_jumps.cpp @@ -50,7 +50,7 @@ public: * into expressions. */ ir_visitor_status -redundant_jumps_visitor::visit_enter(ir_assignment *ir) +redundant_jumps_visitor::visit_enter(ir_assignment *) { return visit_continue_with_parent; } diff --git a/src/glsl/opt_vectorize.cpp b/src/glsl/opt_vectorize.cpp index 13faac05ef1..3306397fd3a 100644 --- a/src/glsl/opt_vectorize.cpp +++ b/src/glsl/opt_vectorize.cpp @@ -298,7 +298,7 @@ ir_vectorize_visitor::visit_enter(ir_swizzle *ir) * FINISHME: If all of scalar indices are identical we could vectorize. */ ir_visitor_status -ir_vectorize_visitor::visit_enter(ir_dereference_array *ir) +ir_vectorize_visitor::visit_enter(ir_dereference_array *) { this->current_assignment = NULL; return visit_continue_with_parent; -- 2.30.2