glsl: Silence unused parameter warnings
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 21 Apr 2015 23:58:59 +0000 (08:58 +0900)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 4 May 2015 20:49:04 +0000 (13:49 -0700)
I opted to comment out "last_field" because it was not obvious what the
meaning of the dangling bool would be.  For the other parameters, the
meaning was more intuitive without the name.

link_uniform_blocks.cpp:70:65: warning: unused parameter 'name' [-Wunused-parameter]
    virtual void enter_record(const glsl_type *type, const char *name,
                                                                 ^
link_uniform_blocks.cpp:77:65: warning: unused parameter 'name' [-Wunused-parameter]
    virtual void leave_record(const glsl_type *type, const char *name,
                                                                 ^
link_uniform_blocks.cpp:93:62: warning: unused parameter 'record_type' [-Wunused-parameter]
                             bool row_major, const glsl_type *record_type,
                                                              ^
link_uniform_blocks.cpp:94:34: warning: unused parameter 'last_field' [-Wunused-parameter]
                             bool last_field)
                                  ^
link_uniforms.cpp:547:65: warning: unused parameter 'name' [-Wunused-parameter]
    virtual void enter_record(const glsl_type *type, const char *name,
                                                                 ^
link_uniforms.cpp:556:65: warning: unused parameter 'name' [-Wunused-parameter]
    virtual void leave_record(const glsl_type *type, const char *name,
                                                                 ^
link_uniforms.cpp:567:34: warning: unused parameter 'last_field' [-Wunused-parameter]
                             bool last_field)
                                  ^

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/glsl/link_uniform_blocks.cpp
src/glsl/link_uniforms.cpp

index 6ca41107e53880c2a5edffb68475b09d55b08851..898544bea8296991ab2b12c9b78f681f3751213d 100644 (file)
@@ -67,14 +67,14 @@ private:
       assert(!"Should not get here.");
    }
 
-   virtual void enter_record(const glsl_type *type, const char *name,
+   virtual void enter_record(const glsl_type *type, const char *,
                              bool row_major) {
       assert(type->is_record());
       this->offset = glsl_align(
             this->offset, type->std140_base_alignment(row_major));
    }
 
-   virtual void leave_record(const glsl_type *type, const char *name,
+   virtual void leave_record(const glsl_type *type, const char *,
                              bool row_major) {
       assert(type->is_record());
 
@@ -90,8 +90,8 @@ private:
    }
 
    virtual void visit_field(const glsl_type *type, const char *name,
-                            bool row_major, const glsl_type *record_type,
-                            bool last_field)
+                            bool row_major, const glsl_type *,
+                            bool /* last_field */)
    {
       assert(this->index < this->num_variables);
 
index d5ca23a385a7a846f952d23d316d2c05f814b604..2c928e1445bd09dfda2aaaffd7249eb47fb6a64b 100644 (file)
@@ -544,7 +544,7 @@ private:
       assert(!"Should not get here.");
    }
 
-   virtual void enter_record(const glsl_type *type, const char *name,
+   virtual void enter_record(const glsl_type *type, const char *,
                              bool row_major) {
       assert(type->is_record());
       if (this->ubo_block_index == -1)
@@ -553,7 +553,7 @@ private:
             this->ubo_byte_offset, type->std140_base_alignment(row_major));
    }
 
-   virtual void leave_record(const glsl_type *type, const char *name,
+   virtual void leave_record(const glsl_type *type, const char *,
                              bool row_major) {
       assert(type->is_record());
       if (this->ubo_block_index == -1)
@@ -564,7 +564,7 @@ private:
 
    virtual void visit_field(const glsl_type *type, const char *name,
                             bool row_major, const glsl_type *record_type,
-                            bool last_field)
+                            bool /* last_field */)
    {
       assert(!type->without_array()->is_record());
       assert(!type->without_array()->is_interface());