Re: [Mesa-dev] [PATCH 1/5] mesa: Silence an unused parameter warning

2018-04-26 Thread Lionel Landwerlin

Reviewed-by: Lionel Landwerlin 

On 26/04/18 22:28, Ian Romanick wrote:

From: Ian Romanick 

main/framebuffer.c: In function ‘update_color_draw_buffers’:
main/framebuffer.c:629:46: warning: unused parameter ‘ctx’ [-Wunused-parameter]
  update_color_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb)
   ^~~

Signed-off-by: Ian Romanick 
---
  src/mesa/main/framebuffer.c | 9 -
  1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 4ea18f6858e..8e751b453b7 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -549,7 +549,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
   * writing colors.
   */
  static void
-update_color_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb)
+update_color_draw_buffers(struct gl_framebuffer *fb)
  {
 GLuint output;
  
@@ -573,9 +573,8 @@ update_color_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb)

   * Unlike the DrawBuffer, we can only read from one (or zero) color buffers.
   */
  static void
-update_color_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
+update_color_read_buffer(struct gl_framebuffer *fb)
  {
-   (void) ctx;
 if (fb->_ColorReadBufferIndex == BUFFER_NONE ||
 fb->DeletePending ||
 fb->Width == 0 ||
@@ -638,8 +637,8 @@ update_framebuffer(struct gl_context *ctx, struct 
gl_framebuffer *fb)
  * read-state if this FB is bound as ctx->DrawBuffer), but no
  * harm.
  */
-   update_color_draw_buffers(ctx, fb);
-   update_color_read_buffer(ctx, fb);
+   update_color_draw_buffers(fb);
+   update_color_read_buffer(fb);
  
 compute_depth_max(fb);

  }



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/5] mesa: Silence an unused parameter warning

2018-04-26 Thread Ian Romanick
From: Ian Romanick 

main/framebuffer.c: In function ‘update_color_draw_buffers’:
main/framebuffer.c:629:46: warning: unused parameter ‘ctx’ [-Wunused-parameter]
 update_color_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb)
  ^~~

Signed-off-by: Ian Romanick 
---
 src/mesa/main/framebuffer.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 4ea18f6858e..8e751b453b7 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -549,7 +549,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
  * writing colors.
  */
 static void
-update_color_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb)
+update_color_draw_buffers(struct gl_framebuffer *fb)
 {
GLuint output;
 
@@ -573,9 +573,8 @@ update_color_draw_buffers(struct gl_context *ctx, struct 
gl_framebuffer *fb)
  * Unlike the DrawBuffer, we can only read from one (or zero) color buffers.
  */
 static void
-update_color_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
+update_color_read_buffer(struct gl_framebuffer *fb)
 {
-   (void) ctx;
if (fb->_ColorReadBufferIndex == BUFFER_NONE ||
fb->DeletePending ||
fb->Width == 0 ||
@@ -638,8 +637,8 @@ update_framebuffer(struct gl_context *ctx, struct 
gl_framebuffer *fb)
 * read-state if this FB is bound as ctx->DrawBuffer), but no
 * harm.
 */
-   update_color_draw_buffers(ctx, fb);
-   update_color_read_buffer(ctx, fb);
+   update_color_draw_buffers(fb);
+   update_color_read_buffer(fb);
 
compute_depth_max(fb);
 }
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev