From 53b98b0185ddc37f9e3f29eef5cf8d954ba5ac49 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sat, 22 Jun 2019 19:40:04 +0100 Subject: [PATCH] virgl: make use of local variable Otherwise that variable is only used in an assert() and would need an ASSERTED to avoid the warning. Signed-off-by: Eric Engestrom Reviewed-by: Matt Turner --- src/gallium/drivers/virgl/virgl_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index 35becc1..e1a9f4e 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -550,7 +550,7 @@ has_format_bit(struct virgl_supported_format_mask *mask, unsigned idx = val / 32; unsigned bit = val % 32; assert(idx < ARRAY_SIZE(mask->bitmask)); - return (mask->bitmask[val / 32] & (1u << bit)) != 0; + return (mask->bitmask[idx] & (1u << bit)) != 0; } bool -- 2.7.4