[Mesa-dev] [PATCH 05/15] mesa: Silence unused parameter warning in _mesa_clear_shader_program_data

Ian Romanick idr at freedesktop.org
Thu Oct 23 09:35:20 PDT 2014


From: Ian Romanick <ian.d.romanick at intel.com>

Just remove the parameter.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/glsl/main.cpp                   | 2 +-
 src/glsl/standalone_scaffolding.cpp | 3 +--
 src/glsl/standalone_scaffolding.h   | 3 +--
 src/mesa/main/shaderobj.c           | 5 ++---
 src/mesa/main/shaderobj.h           | 3 +--
 src/mesa/program/ir_to_mesa.cpp     | 2 +-
 6 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 96d3915..9b36a1f 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -403,7 +403,7 @@ main(int argc, char **argv)
    }
 
    if ((status == EXIT_SUCCESS) && do_link)  {
-      _mesa_clear_shader_program_data(ctx, whole_program);
+      _mesa_clear_shader_program_data(whole_program);
 
       link_shaders(ctx, whole_program);
       status = (whole_program->LinkStatus) ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index a635c96..67b0d0c 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -84,8 +84,7 @@ _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
 }
 
 void
-_mesa_clear_shader_program_data(struct gl_context *ctx,
-                                struct gl_shader_program *shProg)
+_mesa_clear_shader_program_data(struct gl_shader_program *shProg)
 {
    unsigned i;
 
diff --git a/src/glsl/standalone_scaffolding.h b/src/glsl/standalone_scaffolding.h
index b805f40..895dd27 100644
--- a/src/glsl/standalone_scaffolding.h
+++ b/src/glsl/standalone_scaffolding.h
@@ -45,8 +45,7 @@ extern "C" struct gl_shader *
 _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type);
 
 extern "C" void
-_mesa_clear_shader_program_data(struct gl_context *,
-                                struct gl_shader_program *);
+_mesa_clear_shader_program_data(struct gl_shader_program *);
 
 extern "C" void
 _mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 785baa2..15c736e 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -277,8 +277,7 @@ _mesa_new_shader_program(struct gl_context *ctx, GLuint name)
  * Clear (free) the shader program state that gets produced by linking.
  */
 void
-_mesa_clear_shader_program_data(struct gl_context *ctx,
-                                struct gl_shader_program *shProg)
+_mesa_clear_shader_program_data(struct gl_shader_program *shProg)
 {
    unsigned i;
 
@@ -332,7 +331,7 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
 
    assert(shProg->Type == GL_SHADER_PROGRAM_MESA);
 
-   _mesa_clear_shader_program_data(ctx, shProg);
+   _mesa_clear_shader_program_data(shProg);
 
    if (shProg->AttributeBindings) {
       string_to_uint_map_dtor(shProg->AttributeBindings);
diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h
index d72919c..be1e44e 100644
--- a/src/mesa/main/shaderobj.h
+++ b/src/mesa/main/shaderobj.h
@@ -82,8 +82,7 @@ _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name,
                                 const char *caller);
 
 extern void
-_mesa_clear_shader_program_data(struct gl_context *ctx,
-                                struct gl_shader_program *shProg);
+_mesa_clear_shader_program_data(struct gl_shader_program *shProg);
 
 extern void
 _mesa_free_shader_program_data(struct gl_context *ctx,
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index b3e04d7..5cd9058 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -3020,7 +3020,7 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
 {
    unsigned int i;
 
-   _mesa_clear_shader_program_data(ctx, prog);
+   _mesa_clear_shader_program_data(prog);
 
    prog->LinkStatus = GL_TRUE;
 
-- 
1.8.1.4



More information about the mesa-dev mailing list