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 2021/11/27 11:48:19 UTC

[incubator-nuttx-apps] 02/02: system/trace/trace.c: Condition the creation of "i" and "count" varialbes with SYSCALL or IRQ instrumentation to avoid a warning.

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-apps.git

commit 7b192f24fe85f6f1e022987857b180095cc75cbe
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Fri Nov 26 18:07:42 2021 +0100

    system/trace/trace.c: Condition the creation of "i" and "count"
    varialbes with SYSCALL or IRQ instrumentation to avoid a warning.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 system/trace/trace.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/system/trace/trace.c b/system/trace/trace.c
index c7f9d7f..843cdb4 100644
--- a/system/trace/trace.c
+++ b/system/trace/trace.c
@@ -292,8 +292,12 @@ static int trace_cmd_mode(int index, int argc, FAR char **argv,
 #ifdef CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER
   struct note_filter_irq_s filter_irq;
 #endif
+
+#if defined(CONFIG_SCHED_INSTRUMENTATION_SYSCALL) ||\
+    defined(CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER)
   int i;
   int count;
+#endif
 
   /* Usage: trace mode [{+|-}{o|s|a|i}...] */