Module: Mesa
Branch: master
Commit: 5cd5878a1f8cbd2d878f0941d86f33530950acb4
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5cd5878a1f8cbd2d878f0941d86f33530950acb4

Author: Brian Paul <bri...@vmware.com>
Date:   Thu Mar 22 09:23:09 2018 -0600

st/mesa: silence unhandled switch case warning

And improve the unreachable() error message.

Reviewed-by: Mathias Fröhlich <mathias.froehl...@web.de>

---

 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 ef7b7fa777..baba2d414b 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;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to