From 346149dcf9ad4f1c34ae504c03d8b1b32f8474b9 Mon Sep 17 00:00:00 2001 From: yzct12345 <87620833+yzct12345@users.noreply.github.com> Date: Thu, 5 Aug 2021 17:21:56 +0000 Subject: [PATCH] assert: Avoid empty macros --- src/common/assert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/assert.h b/src/common/assert.h index b3ba35c0f..f71beec8e 100644 --- a/src/common/assert.h +++ b/src/common/assert.h @@ -52,8 +52,8 @@ assert_noinline_call(const Fn& fn) { #define DEBUG_ASSERT(_a_) ASSERT(_a_) #define DEBUG_ASSERT_MSG(_a_, ...) ASSERT_MSG(_a_, __VA_ARGS__) #else // not debug -#define DEBUG_ASSERT(_a_) -#define DEBUG_ASSERT_MSG(_a_, _desc_, ...) +#define DEBUG_ASSERT(_a_) do {} while (0) +#define DEBUG_ASSERT_MSG(_a_, _desc_, ...) do {} while (0) #endif #define UNIMPLEMENTED() ASSERT_MSG(false, "Unimplemented code!")