You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/06 15:03:34 UTC

[incubator-nuttx] 15/18: arch/arm/src/armv7-m/arm_assert.c: Don't assume debug macro expansion

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c3791e7c23b962a780e9b859f65819081bb34015
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 19:34:50 2020 +0900

    arch/arm/src/armv7-m/arm_assert.c: Don't assume debug macro expansion
---
 arch/arm/src/armv7-m/arm_assert.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/armv7-m/arm_assert.c b/arch/arm/src/armv7-m/arm_assert.c
index c1a29cd..ee6c0d1 100644
--- a/arch/arm/src/armv7-m/arm_assert.c
+++ b/arch/arm/src/armv7-m/arm_assert.c
@@ -398,7 +398,7 @@ void up_assert(const char *filename, int lineno)
   syslog_flush();
 
 #ifdef CONFIG_SMP
-#if CONFIG_TASK_NAME_SIZE > 0
+#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT)
   _alert("Assertion failed CPU%d at file:%s line: %d task: %s\n",
         up_cpu_index(), filename, lineno, rtcb->name);
 #else
@@ -406,7 +406,7 @@ void up_assert(const char *filename, int lineno)
         up_cpu_index(), filename, lineno);
 #endif
 #else
-#if CONFIG_TASK_NAME_SIZE > 0
+#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT)
   _alert("Assertion failed at file:%s line: %d task: %s\n",
         filename, lineno, rtcb->name);
 #else