diff options
author | Ian Romanick <[email protected]> | 2015-08-19 13:36:22 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-09-02 16:24:17 -0700 |
commit | 4ff9e599cb05d2e33e3c642ba2ded9afbe76d552 (patch) | |
tree | 2c6ed5eb691298ac38a4b75e2aa2e9880a95177a | |
parent | 8fafb0a67faa548cb16e122e214912a17835e369 (diff) |
linker: Silence GCC unused parameter warnings
linker.cpp:320:55: warning: unused parameter 'ir' [-Wunused-parameter]
virtual ir_visitor_status visit_leave(ir_function *ir)
^
linker.cpp:327:53: warning: unused parameter 'ir' [-Wunused-parameter]
virtual ir_visitor_status visit_leave(ir_return *ir)
^
linker.cpp:333:49: warning: unused parameter 'ir' [-Wunused-parameter]
virtual ir_visitor_status visit_enter(ir_if *ir)
^
linker.cpp:339:49: warning: unused parameter 'ir' [-Wunused-parameter]
virtual ir_visitor_status visit_leave(ir_if *ir)
^
linker.cpp:345:51: warning: unused parameter 'ir' [-Wunused-parameter]
virtual ir_visitor_status visit_enter(ir_loop *ir)
^
linker.cpp:351:51: warning: unused parameter 'ir' [-Wunused-parameter]
virtual ir_visitor_status visit_leave(ir_loop *ir)
^
linker.cpp:2824:53: warning: unused parameter 'ctx' [-Wunused-parameter]
link_calculate_subroutine_compat(struct gl_context *ctx, struct gl_shader_program *prog)
^
linker.cpp:2854:47: warning: unused parameter 'ctx' [-Wunused-parameter]
check_subroutine_resources(struct gl_context *ctx, struct gl_shader_program *prog)
^
linker.cpp:3368:49: warning: unused parameter 'ctx' [-Wunused-parameter]
link_assign_subroutine_types(struct gl_context *ctx,
^
Also make link_assign_subroutine_types static since it is only called
from this file.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
-rw-r--r-- | src/glsl/linker.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 47f7d2574dd..bc5e55b4b21 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -317,38 +317,38 @@ public: return visit_continue; } - virtual ir_visitor_status visit_leave(ir_function *ir) + virtual ir_visitor_status visit_leave(ir_function *) { in_main = false; after_return = false; return visit_continue; } - virtual ir_visitor_status visit_leave(ir_return *ir) + virtual ir_visitor_status visit_leave(ir_return *) { after_return = true; return visit_continue; } - virtual ir_visitor_status visit_enter(ir_if *ir) + virtual ir_visitor_status visit_enter(ir_if *) { ++control_flow; return visit_continue; } - virtual ir_visitor_status visit_leave(ir_if *ir) + virtual ir_visitor_status visit_leave(ir_if *) { --control_flow; return visit_continue; } - virtual ir_visitor_status visit_enter(ir_loop *ir) + virtual ir_visitor_status visit_enter(ir_loop *) { ++control_flow; return visit_continue; } - virtual ir_visitor_status visit_leave(ir_loop *ir) + virtual ir_visitor_status visit_leave(ir_loop *) { --control_flow; return visit_continue; @@ -2821,7 +2821,7 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog) } static void -link_calculate_subroutine_compat(struct gl_context *ctx, struct gl_shader_program *prog) +link_calculate_subroutine_compat(struct gl_shader_program *prog) { for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) { struct gl_shader *sh = prog->_LinkedShaders[i]; @@ -2851,7 +2851,7 @@ link_calculate_subroutine_compat(struct gl_context *ctx, struct gl_shader_progra } static void -check_subroutine_resources(struct gl_context *ctx, struct gl_shader_program *prog) +check_subroutine_resources(struct gl_shader_program *prog) { for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) { struct gl_shader *sh = prog->_LinkedShaders[i]; @@ -3364,9 +3364,8 @@ validate_sampler_array_indexing(struct gl_context *ctx, return true; } -void -link_assign_subroutine_types(struct gl_context *ctx, - struct gl_shader_program *prog) +static void +link_assign_subroutine_types(struct gl_shader_program *prog) { for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) { gl_shader *sh = prog->_LinkedShaders[i]; @@ -3588,7 +3587,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) } check_explicit_uniform_locations(ctx, prog); - link_assign_subroutine_types(ctx, prog); + link_assign_subroutine_types(prog); if (!prog->LinkStatus) goto done; @@ -3848,9 +3847,9 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) link_assign_atomic_counter_resources(ctx, prog); store_fragdepth_layout(prog); - link_calculate_subroutine_compat(ctx, prog); + link_calculate_subroutine_compat(prog); check_resources(ctx, prog); - check_subroutine_resources(ctx, prog); + check_subroutine_resources(prog); check_image_resources(ctx, prog); link_check_atomic_counter_resources(ctx, prog); |