From: Eric Anholt Date: Mon, 26 Nov 2018 21:11:31 +0000 (-0800) Subject: gallium: Fix uninitialized variable warning in compute test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bade179153b10300129c93afb1e629d9814c122e;p=mesa.git 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 --- 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)