[Mesa-dev] [PATCH 08/23] gallium/aux/util/u_format_latc.c: Fix various -Wunused-param warnings,

Brian Paul brianp at vmware.com
Mon Nov 13 16:31:29 UTC 2017


On 11/12/2017 06:55 AM, Gert Wollny wrote:
> Decorate the unused params with "UNUSED".
> ---
>   src/gallium/auxiliary/util/u_format_latc.c | 24 +++++++++++++++++-------
>   1 file changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_format_latc.c b/src/gallium/auxiliary/util/u_format_latc.c
> index 31d72b5a0a..ce69371358 100644
> @@ -100,19 +100,24 @@ util_format_latc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigne
>   }
>
>   void
> -util_format_latc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
> +util_format_latc1_snorm_fetch_rgba_8unorm(uint8_t *dst  UNUSED, const uint8_t *src  UNUSED,
> +                                          unsigned i  UNUSED, unsigned j  UNUSED)

Here you have two spaces before UNUSED, below you use one.  Can we use 
one everywhere?

Also, can you please wrap long lines at 78 columns?


>   {
>      fprintf(stderr,"%s\n", __func__);
>   }
>
>   void
> -util_format_latc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
> +util_format_latc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row  UNUSED, unsigned dst_stride  UNUSED,
> +                                           const uint8_t *src_row  UNUSED, unsigned src_stride  UNUSED,
> +                                           unsigned width  UNUSED, unsigned height  UNUSED)
>   {
>      fprintf(stderr,"%s\n", __func__);
>   }
>
>   void
> -util_format_latc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
> +util_format_latc1_snorm_pack_rgba_8unorm(uint8_t *dst_row  UNUSED, unsigned dst_stride  UNUSED,
> +                                         const uint8_t *src_row UNUSED, unsigned src_stride UNUSED,
> +                                         unsigned width UNUSED, unsigned height UNUSED)
>   {
>      fprintf(stderr,"%s\n", __func__);
>   }
> @@ -231,19 +236,24 @@ util_format_latc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigne
>
>
>   void
> -util_format_latc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
> +util_format_latc2_snorm_fetch_rgba_8unorm(uint8_t *dst UNUSED, const uint8_t *src UNUSED,
> +                                          unsigned i UNUSED, unsigned j UNUSED)
>   {
>      fprintf(stderr,"%s\n", __func__);
>   }
>
>   void
> -util_format_latc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
> +util_format_latc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row UNUSED, unsigned dst_stride UNUSED,
> +                                           const uint8_t *src_row UNUSED, unsigned src_stride UNUSED,
> +                                           unsigned width UNUSED, unsigned height UNUSED)
>   {
>      fprintf(stderr,"%s\n", __func__);
>   }
>
>   void
> -util_format_latc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
> +util_format_latc2_snorm_pack_rgba_8unorm(uint8_t *dst_row UNUSED, unsigned dst_stride UNUSED,
> +                                         const uint8_t *src_row UNUSED, unsigned src_stride UNUSED,
> +                                         unsigned width UNUSED, unsigned height UNUSED)
>   {
>      fprintf(stderr,"%s\n", __func__);
>   }
>



More information about the mesa-dev mailing list