gallium/tests: Fix compiler warning about unused vars in trivial tests.
authorEric Anholt <eric@anholt.net>
Tue, 25 Aug 2020 18:20:46 +0000 (11:20 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Aug 2020 22:45:08 +0000 (22:45 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462>

src/gallium/tests/trivial/compute.c
src/gallium/tests/trivial/quad-tex.c
src/gallium/tests/trivial/tri.c

index cfdbdf1cc8dc29b3f3f9a416116c955db465b98c..6f4fe36a5363d09d1bba8e05f0b99f113ddc3d21 100644 (file)
@@ -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);
index a30cfb9b9f7b4b2c92e4ffcf114451d758b93cfc..ba0a7ac8fb33ffd827d98d2bf93d7cb9b90a76e3 100644 (file)
@@ -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);
index 79bb5d95086a562a399e198547c88157b98fd437..254a10ac8639969d546cca1cdb82901854c5a2a3 100644 (file)
@@ -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);