From e6584db26da34572fb13aa236e16e19f71c8e976 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 26 Aug 2022 14:16:16 +0200 Subject: user/libc: prepare for OpenED port --- src/shared/include/assert.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/shared/include') diff --git a/src/shared/include/assert.h b/src/shared/include/assert.h index 7adf297..7520aa9 100644 --- a/src/shared/include/assert.h +++ b/src/shared/include/assert.h @@ -1,3 +1,7 @@ -#pragma once +#ifdef NDEBUG +#define assert(stmt) do {} while (0) +#else #define assert(stmt) do { if (!(stmt)) __badassert(__func__, __FILE__, __LINE__); } while (0) +#endif + _Noreturn void __badassert(const char *func, const char *file, int line); -- cgit v1.2.3