From e2b7cce13cb441bb026eb0225445d993a5a8e09d 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 | 5 ++++- components/esp_hw_support/include/esp_memory_utils.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/bootloader_support/include/bootloader_memory_utils.h b/components/bootloader_support/include/bootloader_memory_utils.h index e77e4cc8aa..cd6378ca6c 100644 --- a/components/bootloader_support/include/bootloader_memory_utils.h +++ b/components/bootloader_support/include/bootloader_memory_utils.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2010-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2010-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -87,6 +87,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); @@ -105,6 +106,7 @@ inline static bool esp_ptr_in_rtc_iram_fast(const void *p) { #if SOC_RTC_FAST_MEM_SUPPORTED && (SOC_RTC_IRAM_LOW != SOC_RTC_DRAM_LOW) return ((intptr_t)p >= SOC_RTC_IRAM_LOW && (intptr_t)p < SOC_RTC_IRAM_HIGH); #else + (void)p; return false; #endif } @@ -121,6 +123,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 de0cea32c4..4b3a5db4ca 100644 --- a/components/esp_hw_support/include/esp_memory_utils.h +++ b/components/esp_hw_support/include/esp_memory_utils.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2010-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2010-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -86,6 +86,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); @@ -104,6 +105,7 @@ inline static bool esp_ptr_in_rtc_iram_fast(const void *p) { #if SOC_RTC_FAST_MEM_SUPPORTED && (SOC_RTC_IRAM_LOW != SOC_RTC_DRAM_LOW) return ((intptr_t)p >= SOC_RTC_IRAM_LOW && (intptr_t)p < SOC_RTC_IRAM_HIGH); #else + (void)p; return false; #endif } @@ -120,6 +122,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 }