[Mesa-dev] [PATCH] st/mesa: silence unhandled switch case warning
Mathias Fröhlich
Mathias.Froehlich at gmx.net
Fri Mar 23 18:25:24 UTC 2018
On Thursday, 22 March 2018 16:23:41 CET Brian Paul wrote:
> And improve the unreachable() error message.
Sure:
Reviewed-by: Mathias Fröhlich <mathias.froehlich at web.de>
best
Mathias
> ---
> src/mesa/state_tracker/st_glsl_types.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_glsl_types.cpp b/src/mesa/
state_tracker/st_glsl_types.cpp
> index ef7b7fa..baba2d4 100644
> --- a/src/mesa/state_tracker/st_glsl_types.cpp
> +++ b/src/mesa/state_tracker/st_glsl_types.cpp
> @@ -146,7 +146,8 @@ st_glsl_type_dword_size(const struct glsl_type *type)
> case GLSL_TYPE_ERROR:
> case GLSL_TYPE_INTERFACE:
> case GLSL_TYPE_FUNCTION:
> - unreachable("not reached");
> + default:
> + unreachable("invalid type in st_glsl_type_dword_size()");
> }
>
> return 0;
>
More information about the mesa-dev
mailing list