From 7f5d09c9294d5c328e48c3a7caf6910c85752146 Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Tue, 3 Aug 2010 08:45:58 +0000 Subject: [PATCH] fix compiling warning. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@821 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- libcpu/arm/common/backtrace.c | 2 +- libcpu/arm/s3c24x0/cpu.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libcpu/arm/common/backtrace.c b/libcpu/arm/common/backtrace.c index 59a4d0bf79..764c0f5e1b 100644 --- a/libcpu/arm/common/backtrace.c +++ b/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; diff --git a/libcpu/arm/s3c24x0/cpu.c b/libcpu/arm/s3c24x0/cpu.c index 34ba6b889b..a9845f4125 100644 --- a/libcpu/arm/s3c24x0/cpu.c +++ b/libcpu/arm/s3c24x0/cpu.c @@ -12,6 +12,7 @@ * 2006-03-13 Bernard first version */ +#include #include #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); + } } /*@}*/