diff --git a/src/util/u_debug.c b/src/util/u_debug.c index 6fda1fdcf85..f017886ebf1 100644 --- a/src/util/u_debug.c +++ b/src/util/u_debug.c @@ -327,16 +327,6 @@ debug_get_flags_option(const char *name, } -void -_debug_assert_fail(const char *expr, const char *file, unsigned line, - const char *function) -{ - _debug_printf("%s:%u:%s: Assertion `%s' failed.\n", - file, line, function, expr); - os_abort(); -} - - const char * debug_dump_enum(const struct debug_named_value *names, unsigned long value) diff --git a/src/util/u_debug.h b/src/util/u_debug.h index b5c2396896a..1640c0f4115 100644 --- a/src/util/u_debug.h +++ b/src/util/u_debug.h @@ -204,34 +204,6 @@ debug_get_num_option(const char *name, long dfault); void debug_get_version_option(const char *name, unsigned *major, unsigned *minor); -#ifdef _MSC_VER -__declspec(noreturn) -#endif -void _debug_assert_fail(const char *expr, - const char *file, - unsigned line, - const char *function) -#if defined(__GNUC__) && !defined(DEBUG) - __attribute__((noreturn)) -#endif -; - - -/** - * Assert macro - * - * Do not expect that the assert call terminates -- errors must be handled - * regardless of assert behavior. - * - * For non debug builds the assert macro will expand to a no-op, so do not - * call functions with side effects in the assert expression. - */ -#ifndef NDEBUG -#define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__)) -#else -#define debug_assert(expr) (void)(0 && (expr)) -#endif - /** * Output the current function name.