[Mesa-dev] [PATCH 5/5] r100: Silence numerous unused this or that warnings

Marek Olšák maraeo at gmail.com
Thu Jun 1 16:26:07 UTC 2017


For the series:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

About your r100-r200 coding style question, I don't have a specific
answer. It's up to you what you wanna do with it.

Marek


On Wed, May 31, 2017 at 2:40 AM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> radeon_fbo.c: In function ‘radeon_map_renderbuffer_s8z24’:
> radeon_fbo.c:147:50: warning: unused parameter ‘ctx’ [-Wunused-parameter]
>  radeon_map_renderbuffer_s8z24(struct gl_context *ctx,
>                                                   ^~~
> radeon_fbo.c: In function ‘radeon_map_renderbuffer_z16’:
> radeon_fbo.c:186:48: warning: unused parameter ‘ctx’ [-Wunused-parameter]
>  radeon_map_renderbuffer_z16(struct gl_context *ctx,
>                                                 ^~~
> radeon_fbo.c: In function ‘radeon_unmap_renderbuffer_s8z24’:
> radeon_fbo.c:344:52: warning: unused parameter ‘ctx’ [-Wunused-parameter]
>  radeon_unmap_renderbuffer_s8z24(struct gl_context *ctx,
>                                                     ^~~
> radeon_fbo.c: In function ‘radeon_unmap_renderbuffer_z16’:
> radeon_fbo.c:377:50: warning: unused parameter ‘ctx’ [-Wunused-parameter]
>  radeon_unmap_renderbuffer_z16(struct gl_context *ctx,
>                                                   ^~~
> radeon_fbo.c: In function ‘radeon_nop_alloc_storage’:
> radeon_fbo.c:624:75: warning: unused parameter ‘rb’ [-Wunused-parameter]
>  radeon_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
>                                                                            ^~
> radeon_fbo.c:625:12: warning: unused parameter ‘internalFormat’ [-Wunused-parameter]
>      GLenum internalFormat, GLuint width, GLuint height)
>             ^~~~~~~~~~~~~~
> radeon_fbo.c:625:35: warning: unused parameter ‘width’ [-Wunused-parameter]
>      GLenum internalFormat, GLuint width, GLuint height)
>                                    ^~~~~
> radeon_fbo.c:625:49: warning: unused parameter ‘height’ [-Wunused-parameter]
>      GLenum internalFormat, GLuint width, GLuint height)
>                                                  ^~~~~~
> radeon_fbo.c: In function ‘radeon_bind_framebuffer’:
> radeon_fbo.c:696:74: warning: unused parameter ‘fbread’ [-Wunused-parameter]
>                         struct gl_framebuffer *fb, struct gl_framebuffer *fbread)
>                                                                           ^~~~~~
> radeon_fbo.c: In function ‘radeon_validate_framebuffer’:
> radeon_fbo.c:832:19: warning: unused variable ‘radeon’ [-Wunused-variable]
>   radeonContextPtr radeon = RADEON_CONTEXT(ctx);
>                    ^~~~~~
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
>  src/mesa/drivers/dri/radeon/radeon_fbo.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
> index 89ea776..37c9c3f 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
> +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
> @@ -144,8 +144,7 @@ static GLuint get_depth_z16(const struct radeon_renderbuffer *rrb,
>  #endif
>
>  static void
> -radeon_map_renderbuffer_s8z24(struct gl_context *ctx,
> -                      struct gl_renderbuffer *rb,
> +radeon_map_renderbuffer_s8z24(struct gl_renderbuffer *rb,
>                        GLuint x, GLuint y, GLuint w, GLuint h,
>                        GLbitfield mode,
>                        GLubyte **out_map,
> @@ -183,8 +182,7 @@ radeon_map_renderbuffer_s8z24(struct gl_context *ctx,
>  }
>
>  static void
> -radeon_map_renderbuffer_z16(struct gl_context *ctx,
> -                           struct gl_renderbuffer *rb,
> +radeon_map_renderbuffer_z16(struct gl_renderbuffer *rb,
>                             GLuint x, GLuint y, GLuint w, GLuint h,
>                             GLbitfield mode,
>                             GLubyte **out_map,
> @@ -307,12 +305,12 @@ radeon_map_renderbuffer(struct gl_context *ctx,
>
>     if ((rmesa->radeonScreen->chip_flags & RADEON_CHIPSET_DEPTH_ALWAYS_TILED) && !rrb->has_surface) {
>         if (rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT || rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT) {
> -          radeon_map_renderbuffer_s8z24(ctx, rb, x, y, w, h,
> +          radeon_map_renderbuffer_s8z24(rb, x, y, w, h,
>                                          mode, out_map, out_stride);
>            return;
>         }
>         if (rb->Format == MESA_FORMAT_Z_UNORM16) {
> -          radeon_map_renderbuffer_z16(ctx, rb, x, y, w, h,
> +          radeon_map_renderbuffer_z16(rb, x, y, w, h,
>                                        mode, out_map, out_stride);
>            return;
>         }
> @@ -621,8 +619,11 @@ radeon_alloc_window_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
>
>  /** Dummy function for gl_renderbuffer::AllocStorage() */
>  static GLboolean
> -radeon_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
> -                        GLenum internalFormat, GLuint width, GLuint height)
> +radeon_nop_alloc_storage(struct gl_context * ctx,
> +                        UNUSED struct gl_renderbuffer *rb,
> +                        UNUSED GLenum internalFormat,
> +                        UNUSED GLuint width,
> +                        UNUSED GLuint height)
>  {
>     _mesa_problem(ctx, "radeon_op_alloc_storage should never be called.");
>     return GL_FALSE;
> --
> 2.9.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list