This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new fc80c70205 assert: rename __ASSERT to __ASSERT__ to avoid conflict
fc80c70205 is described below
commit fc80c70205727b8714e758399ae55e2dbd943d28
Author: chao an <[email protected]>
AuthorDate: Wed Oct 25 11:32:19 2023 +0800
assert: rename __ASSERT to __ASSERT__ to avoid conflict
The definition of __ASSERT has special define in some OS and librarys,
rename to __ASSERT__ to avoid conflict
Signed-off-by: chao an <[email protected]>
---
include/assert.h | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/include/assert.h b/include/assert.h
index 2c2f21cd5d..45d6e4d323 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -76,28 +76,28 @@
#define PANIC_WITH_REGS(msg, regs) _assert(__ASSERT_FILE__, \
__ASSERT_LINE__, msg, regs)
-#define __ASSERT(f, file, line, _f) \
- do \
- { \
- if (predict_false(!(f))) \
- __assert(file, line, _f); \
- } \
+#define __ASSERT__(f, file, line, _f) \
+ do \
+ { \
+ if (predict_false(!(f))) \
+ __assert(file, line, _f); \
+ } \
while (0)
-#define __VERIFY(f, file, line, _f) \
- do \
- { \
- if (predict_false((f) < 0)) \
- __assert(file, line, _f); \
- } \
+#define __VERIFY__(f, file, line, _f) \
+ do \
+ { \
+ if (predict_false((f) < 0)) \
+ __assert(file, line, _f); \
+ } \
while (0)
#ifdef CONFIG_DEBUG_ASSERTIONS_EXPRESSION
-# define _ASSERT(f,file,line) __ASSERT(f, file, line, #f)
-# define _VERIFY(f,file,line) __VERIFY(f, file, line, #f)
+# define _ASSERT(f,file,line) __ASSERT__(f, file, line, #f)
+# define _VERIFY(f,file,line) __VERIFY__(f, file, line, #f)
#else
-# define _ASSERT(f,file,line) __ASSERT(f, file, line, NULL)
-# define _VERIFY(f,file,line) __VERIFY(f, file, line, NULL)
+# define _ASSERT(f,file,line) __ASSERT__(f, file, line, NULL)
+# define _VERIFY(f,file,line) __VERIFY__(f, file, line, NULL)
#endif
#ifdef CONFIG_DEBUG_ASSERTIONS