freedreno/ir3: Fix compiler warning from the setjmp fails path.
authorEric Anholt <eric@anholt.net>
Fri, 14 Aug 2020 18:56:18 +0000 (11:56 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 19 Aug 2020 16:56:13 +0000 (16:56 +0000)
The TRY() macro doesn't call the contents if we fail to set up
setjmp/longjmp.

Fixes: 3d6e4a201af0 ("freedreno/decode: try harder to not crash in disasm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6323>

src/freedreno/ir3/disasm-a3xx.c

index 29c78ad5e18c28b9bde573eafd7756fa3c591f38..02ab47a88755ce254d31983420842374444f45a3 100644 (file)
@@ -1709,7 +1709,7 @@ int disasm_a3xx(uint32_t *dwords, int sizedwords, int level, FILE *out, unsigned
 int try_disasm_a3xx(uint32_t *dwords, int sizedwords, int level, FILE *out, unsigned gpu_id)
 {
        struct shader_stats stats;
-       int ret;
+       int ret = -1;
        TRY(ret = disasm_a3xx_stat(dwords, sizedwords, level, out, gpu_id, &stats));
        return ret;
 }