mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 09:45:55 +08:00
misc/assert: remove const string from assert expression
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
+3
-3
@@ -43,7 +43,7 @@
|
||||
#undef DEBUGVERIFY /* Like VERIFY, but only if CONFIG_DEBUG_ASSERTIONS is defined */
|
||||
|
||||
#ifndef CONFIG_HAVE_FILENAME
|
||||
# define __FILE__ "unknown"
|
||||
# define __FILE__ NULL
|
||||
# define __LINE__ 0
|
||||
#endif
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
#define ASSERT(f) do { if (!(f)) __assert(__FILE__, __LINE__, #f); } while (0)
|
||||
#define VERIFY(f) do { if ((f) < 0) __assert(__FILE__, __LINE__, #f); } while (0)
|
||||
#else
|
||||
#define ASSERT(f) do { if (!(f)) __assert(__FILE__, __LINE__, "unknown"); } while (0)
|
||||
#define VERIFY(f) do { if ((f) < 0) __assert(__FILE__, __LINE__, "unknown"); } while (0)
|
||||
#define ASSERT(f) do { if (!(f)) __assert(__FILE__, __LINE__, NULL); } while (0)
|
||||
#define VERIFY(f) do { if ((f) < 0) __assert(__FILE__, __LINE__, NULL); } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_ASSERTIONS
|
||||
|
||||
Reference in New Issue
Block a user