Module: Mesa Branch: main Commit: 15291cdefa9b6ee3e16573cf90311ec4c9883543 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=15291cdefa9b6ee3e16573cf90311ec4c9883543
Author: Erik Faye-Lund <[email protected]> Date: Mon Nov 6 12:56:19 2023 +0100 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26064> --- 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);
