Mesa (master): tnl: Silence unused parameter 'attrib' warning in convert_half_to_float

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 13 17:49:39 UTC 2020


Module: Mesa
Branch: master
Commit: 1996f1d3dd2ddd5e894ce608436219c63872570f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1996f1d3dd2ddd5e894ce608436219c63872570f

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Tue Apr  7 20:42:30 2020 -0700

tnl: Silence unused parameter 'attrib' warning in convert_half_to_float

Also clean up some trivial code / whitespace style issues.

src/mesa/tnl/t_draw.c: In function ‘convert_half_to_float’:
src/mesa/tnl/t_draw.c:121:57: warning: unused parameter ‘attrib’ [-Wunused-parameter]
  121 |                       const struct gl_array_attributes *attrib,
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>

---

 src/mesa/tnl/t_draw.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 2146fe92c88..b60cec43e00 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -118,18 +118,17 @@ convert_bgra_to_float(const struct gl_vertex_buffer_binding *binding,
 
 static void
 convert_half_to_float(const struct gl_vertex_buffer_binding *binding,
-                      const struct gl_array_attributes *attrib,
-		      const GLubyte *ptr, GLfloat *fptr,
-		      GLuint count, GLuint sz)
+                      const GLubyte *ptr, GLfloat *fptr,
+                      GLuint count, GLuint sz)
 {
    GLuint i, j;
 
    for (i = 0; i < count; i++) {
       GLhalfARB *in = (GLhalfARB *)ptr;
 
-      for (j = 0; j < sz; j++) {
-	 *fptr++ = _mesa_half_to_float(in[j]);
-      }
+      for (j = 0; j < sz; j++)
+         *fptr++ = _mesa_half_to_float(in[j]);
+
       ptr += binding->Stride;
    }
 }
@@ -221,8 +220,8 @@ static void _tnl_import_array( struct gl_context *ctx,
 	 CONVERT(GLdouble, (GLfloat)); 
 	 break;
       case GL_HALF_FLOAT:
-	 convert_half_to_float(binding, attrib, ptr, fptr, count, sz);
-	 break;
+         convert_half_to_float(binding, ptr, fptr, count, sz);
+         break;
       case GL_FIXED:
          convert_fixed_to_float(binding, attrib, ptr, fptr, count);
          break;



More information about the mesa-commit mailing list