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: 12bceb228a ("gallivm: let reduce ops use llvm intrinsics")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39418>
This commit is contained in:
Gurchetan Singh 2026-01-20 15:42:45 -08:00 committed by Marge Bot
parent 09b9205117
commit 0f582b0268

View file

@ -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,