From d4d22d34d33ff55b8c11e1d058848ac2eaa6c9ec Mon Sep 17 00:00:00 2001 From: 714826565 <714826565@qq.com> Date: Wed, 28 Feb 2018 16:04:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B2=A1=E7=94=A8=E4=BD=BF=E7=94=A8RT=5FUS?= =?UTF-8?q?ING=5FHEAP=E5=AE=8F=E6=97=B6=EF=BC=8Ccomponents.c=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=AC=AC211=E8=A1=8C=E4=BC=9A=E6=8A=A5=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=B8=80=E6=9D=A1=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5=E7=94=A8=E4=BA=8E=E6=B6=88=E9=99=A4=E6=AD=A4=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components.c b/src/components.c index d4982b13c9..6d9f19742f 100644 --- a/src/components.c +++ b/src/components.c @@ -214,6 +214,9 @@ void rt_application_init(void) result = rt_thread_init(tid, "main", main_thread_entry, RT_NULL, main_stack, sizeof(main_stack), RT_THREAD_PRIORITY_MAX / 3, 20); RT_ASSERT(result == RT_EOK); + + /* if not define RT_USING_HEAP, using to eliminate the warning */ + (void)result; #endif rt_thread_startup(tid); From 2357842f596de859a54e8246c82c01a78e1a115c Mon Sep 17 00:00:00 2001 From: skawu Date: Wed, 28 Feb 2018 22:53:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B2=A1=E7=94=A8=E4=BD=BF=E7=94=A8RT=5FUS?= =?UTF-8?q?ING=5FHEAP=E5=AE=8F=E6=97=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E6=9D=A1=E8=AF=AD=E5=8F=A5=E7=94=A8=E4=BA=8E=E6=B6=88?= =?UTF-8?q?=E9=99=A4=E6=AD=A4=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 没用使用RT_USING_HEAP宏时,components.c文件第211行会报警告,增加一条语句用于消除此警告(使用四个空格代替TAB) --- src/components.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components.c b/src/components.c index 6d9f19742f..a73efa37b1 100644 --- a/src/components.c +++ b/src/components.c @@ -215,8 +215,8 @@ void rt_application_init(void) main_stack, sizeof(main_stack), RT_THREAD_PRIORITY_MAX / 3, 20); RT_ASSERT(result == RT_EOK); - /* if not define RT_USING_HEAP, using to eliminate the warning */ - (void)result; + /* if not define RT_USING_HEAP, using to eliminate the warning */ + (void)result; #endif rt_thread_startup(tid);