util: remove our redefinition of assert
authorMarek Olšák <marek.olsak@amd.com>
Thu, 7 Jul 2022 17:28:27 +0000 (13:28 -0400)
committerMarge Bot <emma+marge@anholt.net>
Sun, 10 Jul 2022 00:50:34 +0000 (00:50 +0000)
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 <michael.blumenkrantz@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17403>

src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
src/mesa/state_tracker/st_texture.c
src/util/u_debug.h

index ea2ec78..ad03b2c 100644 (file)
@@ -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:
index 0e72491..07ccac6 100644 (file)
@@ -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;
index b5d9a50..b5c2396 100644 (file)
@@ -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.
  */