mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-18 18:43:31 +08:00
FIX: If we place a return statement after RT_ASSERT we will get a warning: "statement is unreachable" in debug mode. This fix removed this warning.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@487 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
a76c7b3d3e
commit
b8653e766f
@ -114,8 +114,8 @@ typedef rt_uint32_t rt_off_t; /* Type for offset. */
|
|||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
#ifdef RT_DEBUG
|
#ifdef RT_DEBUG
|
||||||
#define RT_ASSERT(EX) if (!(EX)) { rt_kprintf("(%s) assert failed at %s:%d \n", \
|
#define RT_ASSERT(EX) if (!(EX)) {volatile char dummy=0; rt_kprintf("(%s) assert failed at %s:%d \n", \
|
||||||
#EX, __FUNCTION__, __LINE__); while (1);}
|
#EX, __FUNCTION__, __LINE__); while (dummy==0);}
|
||||||
#else
|
#else
|
||||||
#define RT_ASSERT(EX)
|
#define RT_ASSERT(EX)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user