From e82a248593670b6a2759de7418b12c16d85af7a0 Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Fri, 10 Jan 2025 08:56:58 +0100 Subject: [PATCH] fix(esp_hw_support): Unused variables in memory_utils functions --- .../bootloader_support/include/bootloader_memory_utils.h | 3 +++ components/esp_hw_support/include/esp_memory_utils.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/components/bootloader_support/include/bootloader_memory_utils.h b/components/bootloader_support/include/bootloader_memory_utils.h index 1380cc7bff..0e0f048fff 100644 --- a/components/bootloader_support/include/bootloader_memory_utils.h +++ b/components/bootloader_support/include/bootloader_memory_utils.h @@ -96,6 +96,7 @@ __attribute__((always_inline)) inline static bool esp_ptr_in_diram_iram(const void *p) { // TODO: IDF-5980 esp32c6 D/I RAM share the same address #if SOC_DIRAM_IRAM_LOW == SOC_DIRAM_DRAM_LOW + (void)p; return false; #else return ((intptr_t)p >= SOC_DIRAM_IRAM_LOW && (intptr_t)p < SOC_DIRAM_IRAM_HIGH); @@ -114,6 +115,7 @@ inline static bool esp_ptr_in_rtc_iram_fast(const void *p) { #if SOC_RTC_FAST_MEM_SUPPORTED return ((intptr_t)p >= SOC_RTC_IRAM_LOW && (intptr_t)p < SOC_RTC_IRAM_HIGH); #else + (void)p; return false; #endif } @@ -130,6 +132,7 @@ inline static bool esp_ptr_in_rtc_dram_fast(const void *p) { #if SOC_RTC_FAST_MEM_SUPPORTED return ((intptr_t)p >= SOC_RTC_DRAM_LOW && (intptr_t)p < SOC_RTC_DRAM_HIGH); #else + (void)p; return false; #endif } diff --git a/components/esp_hw_support/include/esp_memory_utils.h b/components/esp_hw_support/include/esp_memory_utils.h index bb0f891385..cfde852f86 100644 --- a/components/esp_hw_support/include/esp_memory_utils.h +++ b/components/esp_hw_support/include/esp_memory_utils.h @@ -95,6 +95,7 @@ __attribute__((always_inline)) inline static bool esp_ptr_in_diram_iram(const void *p) { // TODO: IDF-5980 esp32c6 D/I RAM share the same address #if SOC_DIRAM_IRAM_LOW == SOC_DIRAM_DRAM_LOW + (void)p; return false; #else return ((intptr_t)p >= SOC_DIRAM_IRAM_LOW && (intptr_t)p < SOC_DIRAM_IRAM_HIGH); @@ -113,6 +114,7 @@ inline static bool esp_ptr_in_rtc_iram_fast(const void *p) { #if SOC_RTC_FAST_MEM_SUPPORTED return ((intptr_t)p >= SOC_RTC_IRAM_LOW && (intptr_t)p < SOC_RTC_IRAM_HIGH); #else + (void)p; return false; #endif } @@ -129,6 +131,7 @@ inline static bool esp_ptr_in_rtc_dram_fast(const void *p) { #if SOC_RTC_FAST_MEM_SUPPORTED return ((intptr_t)p >= SOC_RTC_DRAM_LOW && (intptr_t)p < SOC_RTC_DRAM_HIGH); #else + (void)p; return false; #endif }