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 <abdelatif.guettouche@espressif.com>
This commit is contained in:
Abdelatif Guettouche 2021-11-26 18:07:42 +01:00 committed by Xiang Xiao
parent c26c4009d9
commit 7b192f24fe

View File

@ -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}...] */