From b9972fb6f5825977f40fbdc57f635bdc0985ea78 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 25 Aug 2020 11:20:46 -0700 Subject: [PATCH] gallium/tests: Fix compiler warning about unused vars in trivial tests. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/tests/trivial/compute.c | 4 ++-- src/gallium/tests/trivial/quad-tex.c | 3 ++- src/gallium/tests/trivial/tri.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gallium/tests/trivial/compute.c b/src/gallium/tests/trivial/compute.c index cfdbdf1cc8d..6f4fe36a536 100644 --- a/src/gallium/tests/trivial/compute.c +++ b/src/gallium/tests/trivial/compute.c @@ -71,7 +71,7 @@ struct context { static void init_ctx(struct context *ctx) { - int ret; + ASSERTED int ret; ret = pipe_loader_probe(&ctx->dev, 1); assert(ret); @@ -153,7 +153,7 @@ static void init_prog(struct context *ctx, unsigned local_sz, .req_input_mem = input_sz }; char *psrc = preprocess_prog(ctx, src, defs); - int ret; + ASSERTED int ret; ret = tgsi_text_translate(psrc, prog, ARRAY_SIZE(prog)); assert(ret); diff --git a/src/gallium/tests/trivial/quad-tex.c b/src/gallium/tests/trivial/quad-tex.c index a30cfb9b9f7..ba0a7ac8fb3 100644 --- a/src/gallium/tests/trivial/quad-tex.c +++ b/src/gallium/tests/trivial/quad-tex.c @@ -47,6 +47,7 @@ /* constant state object helper */ #include "cso_cache/cso_context.h" +#include "util/macros.h" /* u_sampler_view_default_template */ #include "util/u_sampler.h" /* debug_dump_surface_bmp */ @@ -89,7 +90,7 @@ struct program static void init_prog(struct program *p) { struct pipe_surface surf_tmpl; - int ret; + ASSERTED int ret; /* find a hardware device */ ret = pipe_loader_probe(&p->dev, 1); diff --git a/src/gallium/tests/trivial/tri.c b/src/gallium/tests/trivial/tri.c index 79bb5d95086..254a10ac863 100644 --- a/src/gallium/tests/trivial/tri.c +++ b/src/gallium/tests/trivial/tri.c @@ -84,7 +84,7 @@ struct program static void init_prog(struct program *p) { struct pipe_surface surf_tmpl; - int ret; + ASSERTED int ret; /* find a hardware device */ ret = pipe_loader_probe(&p->dev, 1); -- 2.30.2