lima: Fix uninitialized var warning from using assert() as unreachable().
authorEric Anholt <eric@anholt.net>
Tue, 25 Aug 2020 18:33:58 +0000 (11:33 -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/drivers/lima/ir/gp/lower.c
src/gallium/drivers/lima/ir/pp/nir.c

index 296f141216ef5a671615e1df4cc0def2459b4bf3..76a73bb4e2117a48687e4fffed948c6ae8334467 100644 (file)
@@ -323,7 +323,7 @@ static bool gpir_lower_eq_ne(gpir_block *block, gpir_node *node)
          node_new_op = gpir_op_max; /* or */
          break;
       default:
-         assert(0);
+         unreachable("bad node op");
    }
 
    gpir_alu_node *e = gpir_node_to_alu(node);
index 0235fd18bbbdbeb9a589c271ba4f603133d4c624..916e6f53e7ecf79e9f177adc91a67ca0326c2432 100644 (file)
@@ -305,7 +305,7 @@ static bool ppir_emit_intrinsic(ppir_block *block, nir_instr *ni)
          op = ppir_op_load_frontface;
          break;
       default:
-         assert(0);
+         unreachable("bad intrinsic");
          break;
       }