From 0f582b026809b476ecfdad9254eca52302d9b22f Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Tue, 20 Jan 2026 15:42:45 -0800 Subject: [PATCH] gallium: fix sometimes-uninitialized warning Otherwise: gallium/auxiliary/gallivm/lp_bld_nir_soa.c:2394:7: error: variable 'opname' is used uninitialized whenever switch default is taken is observed. Reviewed-by: @LingMan Fixes: 12bceb228a5 ("gallivm: let reduce ops use llvm intrinsics") Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index c82cf2ef823..ee00083c460 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -2392,7 +2392,7 @@ static void emit_reduce(struct lp_build_nir_soa_context *bld, LLVMValueRef src, case nir_op_umax: opname = "umax"; break; case nir_op_fmax: opname = "fmax"; break; default: - assert(0); + UNREACHABLE("Unhandled reduction operation"); }; snprintf(intrinsic, sizeof intrinsic, "llvm.vector.reduce.%s.v%u%s%u", opname,