fix: nir: unused variable ‘else_block’ [-Wunused-variable]
authorKai Wasserbäch <kai@dev.carbon-project.org>
Sat, 17 Sep 2022 11:28:43 +0000 (13:28 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 19 Sep 2022 22:02:16 +0000 (22:02 +0000)
Only used in debug builds.

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18643>

src/compiler/nir/nir_opt_if.c

index ea1486b..142e0ef 100644 (file)
@@ -942,7 +942,7 @@ opt_if_phi_is_condition(nir_builder *b, nir_if *nif)
 {
    /* Grab pointers to the last then/else blocks for looking in the phis. */
    nir_block *then_block = nir_if_last_then_block(nif);
-   nir_block *else_block = nir_if_last_else_block(nif);
+   ASSERTED nir_block *else_block = nir_if_last_else_block(nif);
    nir_ssa_def *cond = nif->condition.ssa;
    bool progress = false;