From 0dd844d89b9fddd5b51a02037033d3119de79725 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Tue, 1 Mar 2022 03:41:38 +0800 Subject: [PATCH] assert.h: Don't use UNUSED macro since it's very easy happen conflict Signed-off-by: Xiang Xiao --- include/assert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/assert.h b/include/assert.h index 572e1d3db0..b7098a906e 100644 --- a/include/assert.h +++ b/include/assert.h @@ -57,7 +57,7 @@ # define DEBUGVERIFY(f) VERIFY(f) #else # define DEBUGPANIC() -# define DEBUGASSERT(f) UNUSED(f) +# define DEBUGASSERT(f) ((void)(1 || (f))) # define DEBUGVERIFY(f) ((void)(f)) #endif @@ -67,7 +67,7 @@ */ #ifdef NDEBUG -# define assert(f) UNUSED(f) +# define assert(f) ((void)(1 || (f))) #else # define assert(f) ASSERT(f) #endif