From bade179153b10300129c93afb1e629d9814c122e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 26 Nov 2018 13:11:31 -0800 Subject: [PATCH] gallium: Fix uninitialized variable warning in compute test. The compiler doesn't know that ny != 0, so x might be uninitialized for the printf at the end. Reviewed-by: Elie Tournier --- src/gallium/tests/trivial/compute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/tests/trivial/compute.c b/src/gallium/tests/trivial/compute.c index afe5d3e9f2b..20e5a4f140c 100644 --- a/src/gallium/tests/trivial/compute.c +++ b/src/gallium/tests/trivial/compute.c @@ -240,7 +240,7 @@ static void check_tex(struct context *ctx, int slot, util_format_get_nblocksy(tex->format, tex->height0)); struct pipe_transfer *xfer; char *map; - int x, y, i; + int x = 0, y, i; int err = 0; if (!check) -- 2.30.2