[Mesa-dev] [PATCH 2/7] glsl: fix warning in release build

Ian Romanick idr at freedesktop.org
Tue Apr 19 19:28:03 UTC 2016


This patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 04/15/2016 06:00 PM, Grazvydas Ignotas wrote:
> Mark variable MAYBE_UNUSED to avoid unused-but-set-variable warning in
> release build.
> 
> Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
> ---
> I have no commit access, if this patch is ok, please someone push.
> 
>  src/compiler/glsl/lower_buffer_access.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/lower_buffer_access.cpp b/src/compiler/glsl/lower_buffer_access.cpp
> index f85b421..59a2ae8 100644
> --- a/src/compiler/glsl/lower_buffer_access.cpp
> +++ b/src/compiler/glsl/lower_buffer_access.cpp
> @@ -283,7 +283,7 @@ lower_buffer_access::is_dereferenced_thing_row_major(const ir_rvalue *deref)
>               * layouts at HIR generation time, but we don't do that for shared
>               * variables, which are always column-major
>               */
> -            ir_variable *var = deref->variable_referenced();
> +            MAYBE_UNUSED ir_variable *var = deref->variable_referenced();
>              assert((var->is_in_buffer_block() && !matrix) ||
>                     var->data.mode == ir_var_shader_shared);
>              return false;
> 



More information about the mesa-dev mailing list