[Mesa-dev] [PATCH] i965/fs: Fix unused variable warning

Matt Turner mattst88 at gmail.com
Wed Jun 10 09:55:30 PDT 2015


On Wed, Jun 10, 2015 at 9:52 AM, Chad Versace <chad.versace at intel.com> wrote:
> Annotate offset_components with attribute 'unused'.
> ---
>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> index 0f1a286..3c24a87 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> @@ -1599,7 +1599,8 @@ fs_visitor::nir_emit_texture(const fs_builder &bld, nir_tex_instr *instr)
>     bool is_cube_array = instr->sampler_dim == GLSL_SAMPLER_DIM_CUBE &&
>                          instr->is_array;
>
> -   int lod_components = 0, offset_components = 0;
> +   int lod_components = 0;
> +   int UNUSED offset_components = 0;

Weird, I didn't even realize we had a macro for this -- and it seems
to be yet unused.

I like it.

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list