From 4624b3d7bd35c1cfd9dab03298d2d45947c96d0f Mon Sep 17 00:00:00 2001 From: Trevor Wu Date: Wed, 25 Oct 2023 16:24:13 +0800 Subject: [PATCH] audio: module adapter: fix redefinition problem When I was using xtensa to build mt8188 platform, I encountered an error: 'redefinition of i'. To fix the problem, I removed the declaration in the for loop. Signed-off-by: Trevor Wu --- src/audio/module_adapter/module_adapter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/module_adapter/module_adapter.c b/src/audio/module_adapter/module_adapter.c index e7e4619ad..a1f18cd03 100644 --- a/src/audio/module_adapter/module_adapter.c +++ b/src/audio/module_adapter/module_adapter.c @@ -1450,9 +1450,9 @@ int module_adapter_reset(struct comp_dev *dev) #endif /* CONFIG_ZEPHYR_DP_SCHEDULER */ if (IS_PROCESSING_MODE_SINK_SOURCE(mod)) { /* for both LL and DP processing */ - for (int i = 0; i < mod->num_of_sources; i++) + for (i = 0; i < mod->num_of_sources; i++) mod->sources[i] = NULL; - for (int i = 0; i < mod->num_of_sinks; i++) + for (i = 0; i < mod->num_of_sinks; i++) mod->sinks[i] = NULL; mod->num_of_sinks = 0; mod->num_of_sources = 0;