[Mesa-dev] [PATCH 13/15] mesa: Silence unused parameter warning in _mesa_init_shader_program

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


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

Just remove the parameter.  Silences:

../../src/mesa/main/uniform_query.cpp:1062:1: warning: unused parameter 'ctx' [-Wunused-parameter]

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/main/uniform_query.cpp | 3 +--
 src/mesa/main/uniforms.c        | 8 ++++----
 src/mesa/main/uniforms.h        | 2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index db97d3d..fcb14c4 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -973,8 +973,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
  * array offset in *offset, or GL_INVALID_INDEX (-1).
  */
 extern "C" unsigned
-_mesa_get_uniform_location(struct gl_context *ctx,
-                           struct gl_shader_program *shProg,
+_mesa_get_uniform_location(struct gl_shader_program *shProg,
                            const GLchar *name,
                            unsigned *out_offset)
 {
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 598b4d4..c307107 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -931,7 +931,7 @@ _mesa_GetUniformLocation(GLuint programObj, const GLcharARB *name)
       return -1;
    }
 
-   index = _mesa_get_uniform_location(ctx, shProg, name, &offset);
+   index = _mesa_get_uniform_location(shProg, name, &offset);
    if (index == GL_INVALID_INDEX)
       return -1;
 
@@ -1004,7 +1004,7 @@ _mesa_GetUniformIndices(GLuint program,
 
    for (i = 0; i < uniformCount; i++) {
       unsigned offset;
-      uniformIndices[i] = _mesa_get_uniform_location(ctx, shProg,
+      uniformIndices[i] = _mesa_get_uniform_location(shProg,
 						     uniformNames[i], &offset);
    }
 }
@@ -1110,7 +1110,7 @@ _mesa_GetActiveUniformBlockiv(GLuint program,
       for (i = 0; i < block->NumUniforms; i++) {
 	 unsigned offset;
          const int idx =
-            _mesa_get_uniform_location(ctx, shProg,
+            _mesa_get_uniform_location(shProg,
                                        block->Uniforms[i].IndexName,
                                        &offset);
          if (idx != -1)
@@ -1127,7 +1127,7 @@ _mesa_GetActiveUniformBlockiv(GLuint program,
       for (i = 0; i < block->NumUniforms; i++) {
 	 unsigned offset;
          const int idx =
-            _mesa_get_uniform_location(ctx, shProg,
+            _mesa_get_uniform_location(shProg,
                                        block->Uniforms[i].IndexName,
                                        &offset);
 
diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h
index e7a370e..6575a52 100644
--- a/src/mesa/main/uniforms.h
+++ b/src/mesa/main/uniforms.h
@@ -259,7 +259,7 @@ _mesa_parse_program_resource_name(const GLchar *name,
                                   const GLchar **out_base_name_end);
 
 unsigned
-_mesa_get_uniform_location(struct gl_context *ctx, struct gl_shader_program *shProg,
+_mesa_get_uniform_location(struct gl_shader_program *shProg,
 			   const GLchar *name, unsigned *offset);
 
 void
-- 
1.8.1.4



More information about the mesa-dev mailing list