summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-08-29 14:56:29 -0700
committerIan Romanick <[email protected]>2011-09-09 12:01:50 -0700
commit9a3bd5e0452c9c791ba94155d3c9ddba42abd114 (patch)
treeb4b8600b5df735d507f162714c8844a67207943b /src
parent681d432f8186cd97e04cf293add72fd73c50523d (diff)
glsl: Silence several "warning: unused parameter"
Diffstat (limited to 'src')
-rw-r--r--src/glsl/ast_to_hir.cpp6
-rw-r--r--src/glsl/builtin_stubs.cpp1
-rw-r--r--src/glsl/glcpp/glcpp.c1
-rw-r--r--src/glsl/ir_function_detect_recursion.cpp4
-rw-r--r--src/glsl/lower_jumps.cpp1
-rw-r--r--src/glsl/opt_discard_simplification.cpp1
-rw-r--r--src/glsl/opt_if_simplification.cpp1
-rw-r--r--src/glsl/standalone_scaffolding.cpp1
8 files changed, 16 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 777f190a4fe..484786c5fbd 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -3014,6 +3014,12 @@ ast_function::hir(exec_list *instructions,
const char *const name = identifier;
+ /* New functions are always added to the top-level IR instruction stream,
+ * so this instruction list pointer is ignored. See also emit_function
+ * (called below).
+ */
+ (void) instructions;
+
/* From page 21 (page 27 of the PDF) of the GLSL 1.20 spec,
*
* "Function declarations (prototypes) cannot occur inside of functions;
diff --git a/src/glsl/builtin_stubs.cpp b/src/glsl/builtin_stubs.cpp
index 00b32949158..dfa5d324e7f 100644
--- a/src/glsl/builtin_stubs.cpp
+++ b/src/glsl/builtin_stubs.cpp
@@ -35,4 +35,5 @@ _mesa_glsl_release_functions(void)
void
_mesa_glsl_initialize_functions(_mesa_glsl_parse_state *state)
{
+ (void) state;
}
diff --git a/src/glsl/glcpp/glcpp.c b/src/glsl/glcpp/glcpp.c
index 325289129d5..e461a650265 100644
--- a/src/glsl/glcpp/glcpp.c
+++ b/src/glsl/glcpp/glcpp.c
@@ -34,6 +34,7 @@ void
_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
struct gl_shader *sh)
{
+ (void) ctx;
*ptr = sh;
}
diff --git a/src/glsl/ir_function_detect_recursion.cpp b/src/glsl/ir_function_detect_recursion.cpp
index 8f805bf1ba9..890bc455f44 100644
--- a/src/glsl/ir_function_detect_recursion.cpp
+++ b/src/glsl/ir_function_detect_recursion.cpp
@@ -289,6 +289,8 @@ emit_errors_unlinked(const void *key, void *data, void *closure)
function *f = (function *) data;
YYLTYPE loc;
+ (void) key;
+
char *proto = prototype_string(f->sig->return_type,
f->sig->function_name(),
&f->sig->parameters);
@@ -308,6 +310,8 @@ emit_errors_linked(const void *key, void *data, void *closure)
(struct gl_shader_program *) closure;
function *f = (function *) data;
+ (void) key;
+
char *proto = prototype_string(f->sig->return_type,
f->sig->function_name(),
&f->sig->parameters);
diff --git a/src/glsl/lower_jumps.cpp b/src/glsl/lower_jumps.cpp
index 61874990a94..92813f567f1 100644
--- a/src/glsl/lower_jumps.cpp
+++ b/src/glsl/lower_jumps.cpp
@@ -438,6 +438,7 @@ struct ir_lower_jumps_visitor : public ir_control_flow_visitor {
* satisfied, because discard statements can't contain other
* statements.
*/
+ (void) ir;
}
enum jump_strength get_jump_strength(ir_instruction* ir)
diff --git a/src/glsl/opt_discard_simplification.cpp b/src/glsl/opt_discard_simplification.cpp
index a19947ddd6c..ba4981bae53 100644
--- a/src/glsl/opt_discard_simplification.cpp
+++ b/src/glsl/opt_discard_simplification.cpp
@@ -138,6 +138,7 @@ is_only_instruction(ir_discard *discard)
ir_visitor_status
discard_simplifier::visit_enter(ir_assignment *ir)
{
+ (void) ir;
return visit_continue_with_parent;
}
diff --git a/src/glsl/opt_if_simplification.cpp b/src/glsl/opt_if_simplification.cpp
index 29b1d18aa59..940dd08d576 100644
--- a/src/glsl/opt_if_simplification.cpp
+++ b/src/glsl/opt_if_simplification.cpp
@@ -49,6 +49,7 @@ public:
ir_visitor_status
ir_if_simplification_visitor::visit_enter(ir_assignment *ir)
{
+ (void) ir;
return visit_continue_with_parent;
}
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index bbd7bb91310..72aa1e428b4 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -37,6 +37,7 @@ void
_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
struct gl_shader *sh)
{
+ (void) ctx;
*ptr = sh;
}