This is an automated email from the ASF dual-hosted git repository. masayuki pushed a commit to branch revert-11734-assert in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 4fe1113d8e60f7853dfb0c84046d0c66fe3468ed Author: Masayuki Ishikawa <[email protected]> AuthorDate: Thu Feb 22 10:32:37 2024 +0900 Revert "assert: When defining NDEBUG, do not use macro parameters" This reverts commit 3b6e7c1927e0eeb47f57b34de6f3056d4d11087b. --- include/assert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/assert.h b/include/assert.h index be3ec5c588..89d550a600 100644 --- a/include/assert.h +++ b/include/assert.h @@ -96,7 +96,7 @@ # define DEBUGVERIFY(f) _VERIFY(f, __DEBUG_ASSERT_FILE__, __DEBUG_ASSERT_LINE__) #else # define DEBUGPANIC() -# define DEBUGASSERT(f) ((void)(0)) +# define DEBUGASSERT(f) ((void)(1 || (f))) # define DEBUGVERIFY(f) ((void)(f)) #endif @@ -106,7 +106,7 @@ */ #ifdef NDEBUG -# define assert(f) ((void)(0)) +# define assert(f) ((void)(1 || (f))) # define VERIFY(f) assert(f) #else # define assert(f) _ASSERT(f, __ASSERT_FILE__, __ASSERT_LINE__)
