Browse Source

fix compiling warning.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@821 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong 15 years ago
parent
commit
7f5d09c929
2 changed files with 6 additions and 2 deletions
  1. 1 1
      libcpu/arm/common/backtrace.c
  2. 5 1
      libcpu/arm/s3c24x0/cpu.c

+ 1 - 1
libcpu/arm/common/backtrace.c

@@ -42,7 +42,7 @@ void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry)
 
 	for(i=0; i<10; i++)
 	{
-		fp = *(fp - 3);
+		fp = (rt_uint32_t *)*(fp - 3);
 		pc = *fp ;
 
 		func_entry = pc - 0xC;

+ 5 - 1
libcpu/arm/s3c24x0/cpu.c

@@ -12,6 +12,7 @@
  * 2006-03-13     Bernard      first version
  */
 
+#include <rthw.h>
 #include <rtthread.h>
 #include "s3c24x0.h"
 
@@ -180,7 +181,10 @@ void rt_hw_cpu_shutdown()
 	rt_kprintf("shutdown...\n");
 
 	level = rt_hw_interrupt_disable();
-	RT_ASSERT(RT_NULL);
+	while (level)
+	{
+		RT_ASSERT(0);
+	}
 }
 
 /*@}*/