summaryrefslogtreecommitdiffstats
path: root/src/gallium/tests
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-11-26 13:11:31 -0800
committerEric Anholt <[email protected]>2018-11-27 11:23:22 -0800
commitbade179153b10300129c93afb1e629d9814c122e (patch)
treee1e388d791f6c771574b4f71ef4cc0006f8ab887 /src/gallium/tests
parent08ea6b9d9bb047603c249468dfe00d7bb9603d5e (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/tests')
-rw-r--r--src/gallium/tests/trivial/compute.c2
1 files changed, 1 insertions, 1 deletions
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)