diff options
author | Dylan Baker <[email protected]> | 2019-12-10 16:03:55 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2020-04-21 11:09:03 -0700 |
commit | 289f02d1d5990e052e21eb250f6d40b47d6eb12f (patch) | |
tree | 9a25e77c00772e0ffe234c2fdcf8de481229e9fc /src/mesa | |
parent | c3db0936ef3077b656d55208dd5ae10437ddc2f7 (diff) |
dri/nouveau: replace assert with unreachable
I don't know why removing imports.h suddenly makes clang realize that
this function can not return in a non-debug build, but it does.
Unreachable is better because it doesn't have this problem.
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_texture.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c index 8afdbbeb3b3..b5ab7bafc12 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c @@ -41,6 +41,8 @@ #include "util/u_memory.h" #include "drivers/common/meta.h" #include "swrast/s_texfetch.h" +#include "util/macros.h" + static struct gl_texture_object * nouveau_texture_new(struct gl_context *ctx, GLuint name, GLenum target) @@ -246,7 +248,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target, return MESA_FORMAT_RGBA_DXT5; default: - assert(0); + unreachable("Unknown format"); } } |