fix(components): initialize srcs variable to prevent scope leakage

This commit is contained in:
Sudeep Mohanty
2026-04-17 11:40:22 +02:00
parent 8f202ad7e8
commit 6e3fae60fc
4 changed files with 7 additions and 2 deletions

View File

@@ -4,8 +4,9 @@ if(${target} STREQUAL "linux")
return() # This component is not supported by the POSIX/Linux simulator
endif()
set(srcs)
if(CONFIG_ESP_TRACE_TRANSPORT_APPTRACE)
set(srcs
list(APPEND srcs
"app_trace.c"
"app_trace_util.c"
"host_file_io.c"

View File

@@ -19,6 +19,7 @@ elseif(esp_tee_build)
# TEE build currently only uses the shared headers.
idf_component_register(INCLUDE_DIRS include)
else()
set(srcs)
if(CONFIG_SECURE_ENABLE_TEE)
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
# Add custom flash target for TEE binary

View File

@@ -4,8 +4,9 @@ if(${target} STREQUAL "linux")
return()
endif()
set(srcs)
if(CONFIG_ESP_TRACE_ENABLE)
set(srcs
list(APPEND srcs
"src/core/esp_trace_core.c"
"src/core/esp_trace_registry.c"
"src/ports/port_utils.c"

View File

@@ -6,6 +6,8 @@ set(original_srcs "spiffs/src/spiffs_cache.c"
"spiffs/src/spiffs_hydrogen.c"
"spiffs/src/spiffs_nucleus.c")
set(srcs)
set(pr)
list(APPEND srcs "spiffs_api.c" ${original_srcs})
if(NOT ${target} STREQUAL "linux")