提交 b8653e76 编写于 作者: M mbbill

FIX: If we place a return statement after RT_ASSERT we will get a warning:...

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
上级 a76c7b3d
...@@ -114,8 +114,8 @@ typedef rt_uint32_t rt_off_t; /* Type for offset. */ ...@@ -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
...@@ -206,7 +206,7 @@ enum rt_object_class_type ...@@ -206,7 +206,7 @@ enum rt_object_class_type
#endif #endif
RT_Object_Class_Unknown, /* The object is unknown. */ RT_Object_Class_Unknown, /* The object is unknown. */
RT_Object_Class_Static = 0x80 /* The object is a static object. */ RT_Object_Class_Static = 0x80 /* The object is a static object. */
}; };
/* /*
* the information of the kernel object * the information of the kernel object
...@@ -499,7 +499,7 @@ struct rt_mempool ...@@ -499,7 +499,7 @@ struct rt_mempool
void *start_address; /* memory pool start */ void *start_address; /* memory pool start */
rt_size_t size; /* size of memory pool */ rt_size_t size; /* size of memory pool */
rt_size_t block_size; /* size of memory blocks */ rt_size_t block_size; /* size of memory blocks */
rt_uint8_t *block_list; /* memory blocks list */ rt_uint8_t *block_list; /* memory blocks list */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册