st/mesa: silence unhandled switch case warning
authorBrian Paul <brianp@vmware.com>
Thu, 22 Mar 2018 15:23:09 +0000 (09:23 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 29 Mar 2018 14:45:10 +0000 (08:45 -0600)
And improve the unreachable() error message.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
src/mesa/state_tracker/st_glsl_types.cpp

index ef7b7fa777ce3873639c99dd043823743375c247..baba2d414b403db81710126ea54df04556fac54d 100644 (file)
@@ -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;