From 2f01a22fe47d15c881704380142579ce42f3a5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 7 Jul 2022 13:28:27 -0400 Subject: [PATCH] util: remove our redefinition of assert I think we can all agree that our own assert is unnecessary. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6780 Acked-By: Mike Blumenkrantz Reviewed-by: Emma Anholt Acked-by: Rob Clark Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_swizzle.c | 3 --- src/mesa/state_tracker/st_texture.c | 3 --- src/util/u_debug.h | 7 ------- 3 files changed, 13 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c index ea2ec780f16..ad03b2c115d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c @@ -408,9 +408,6 @@ lp_build_swizzle_aos(struct lp_build_context *bld, switch (swizzles[i]) { default: assert(0); -#if defined(NDEBUG) || defined(DEBUG) - FALLTHROUGH; -#endif case PIPE_SWIZZLE_X: case PIPE_SWIZZLE_Y: case PIPE_SWIZZLE_Z: diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 0e72491e1b7..07ccac68800 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -187,9 +187,6 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture, break; default: assert(0 && "Unexpected texture in st_gl_texture_dims_to_pipe_dims()"); -#if defined(NDEBUG) || defined(DEBUG) - FALLTHROUGH; -#endif case GL_TEXTURE_3D: case GL_PROXY_TEXTURE_3D: *widthOut = widthIn; diff --git a/src/util/u_debug.h b/src/util/u_debug.h index b5d9a505cfb..b5c2396896a 100644 --- a/src/util/u_debug.h +++ b/src/util/u_debug.h @@ -233,13 +233,6 @@ void _debug_assert_fail(const char *expr, #endif -/** Override standard assert macro */ -#ifdef assert -#undef assert -#endif -#define assert(expr) debug_assert(expr) - - /** * Output the current function name. */