[Mesa-dev] [PATCH] i965: fix release build unused variable warning

Eduardo Lima Mitev elima at igalia.com
Sun Dec 11 18:36:40 UTC 2016


The patch looks good but now that we are at it, I would move the
definition and assignment of 'is_lossless_compressed' to the block where
it is used, right before the assert. Right now we are always defining
and assigning the variable, but it is consumed conditionally.

With that changed, patch is:

Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>

Thanks!

Should I push this and the other patches you submitted and I reviewed?

Eduardo

On 12/10/2016 08:10 PM, Grazvydas Ignotas wrote:
> Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
> ---
>  src/mesa/drivers/dri/i965/brw_blorp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
> index 4c1d858..8b5750c 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp.c
> +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
> @@ -813,8 +813,8 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,
>        can_fast_clear = false;
>  
>     const unsigned logical_layer = irb_logical_mt_layer(irb);
> -   const bool is_lossless_compressed = intel_miptree_is_lossless_compressed(
> -                                          brw, irb->mt);
> +   MAYBE_UNUSED const bool is_lossless_compressed =
> +      intel_miptree_is_lossless_compressed(brw, irb->mt);
>     const enum intel_fast_clear_state fast_clear_state =
>        intel_miptree_get_fast_clear_state(irb->mt, irb->mt_level,
>                                           logical_layer);
> 



More information about the mesa-dev mailing list