From 15291cdefa9b6ee3e16573cf90311ec4c9883543 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 6 Nov 2023 12:56:19 +0100 Subject: [PATCH] mesa/ffvs: use unreachable instead of assert Otherwise I trigger a compiler warning here about a potentially unwritten variable. Let's just make it clear to the compiler what's going on. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/mesa/main/ffvertex_prog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index d69855048b4..bfa6e898528 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -1065,8 +1065,7 @@ static void build_fog( struct tnl_program *p ) fog = load_input(p, VERT_ATTRIB_FOG, glsl_float_type()); break; default: - assert(!"Bad fog mode in build_fog()"); - break; + unreachable("Bad fog mode in build_fog()"); } store_output_float(p, VARYING_SLOT_FOGC, fog);