glsl: Silence several "warning: unused parameter"
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 29 Aug 2011 21:56:29 +0000 (14:56 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 9 Sep 2011 19:01:50 +0000 (12:01 -0700)
src/glsl/ast_to_hir.cpp
src/glsl/builtin_stubs.cpp
src/glsl/glcpp/glcpp.c
src/glsl/ir_function_detect_recursion.cpp
src/glsl/lower_jumps.cpp
src/glsl/opt_discard_simplification.cpp
src/glsl/opt_if_simplification.cpp
src/glsl/standalone_scaffolding.cpp

index 777f190..484786c 100644 (file)
@@ -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;
index 00b3294..dfa5d32 100644 (file)
@@ -35,4 +35,5 @@ _mesa_glsl_release_functions(void)
 void
 _mesa_glsl_initialize_functions(_mesa_glsl_parse_state *state)
 {
+   (void) state;
 }
index 3252891..e461a65 100644 (file)
@@ -34,6 +34,7 @@ void
 _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
                        struct gl_shader *sh)
 {
+   (void) ctx;
    *ptr = sh;
 }
 
index 8f805bf..890bc45 100644 (file)
@@ -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);
index 6187499..92813f5 100644 (file)
@@ -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)
index a19947d..ba4981b 100644 (file)
@@ -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;
 }
 
index 29b1d18..940dd08 100644 (file)
@@ -49,6 +49,7 @@ public:
 ir_visitor_status
 ir_if_simplification_visitor::visit_enter(ir_assignment *ir)
 {
+   (void) ir;
    return visit_continue_with_parent;
 }
 
index bbd7bb9..72aa1e4 100644 (file)
@@ -37,6 +37,7 @@ void
 _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
                        struct gl_shader *sh)
 {
+   (void) ctx;
    *ptr = sh;
 }