From afde2434e8323373ca5bdea759fa3eb281c2948b Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Wed, 23 Feb 2022 18:43:16 +0700 Subject: [PATCH] memprot: fix type casting to avoid suspesious address arithmetic --- components/esp_hw_support/port/esp32c3/esp_memprot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_hw_support/port/esp32c3/esp_memprot.c b/components/esp_hw_support/port/esp32c3/esp_memprot.c index d62311f884..762d661706 100644 --- a/components/esp_hw_support/port/esp32c3/esp_memprot.c +++ b/components/esp_hw_support/port/esp32c3/esp_memprot.c @@ -28,7 +28,7 @@ static void *esp_memprot_iram0_get_def_split_addr(void) static void *esp_memprot_dram0_get_def_split_addr(void) { - return MAP_IRAM_TO_DRAM(&_iram_text_end); + return (void *)MAP_IRAM_TO_DRAM((uint32_t)&_iram_text_end); } static void *esp_memprot_rtcfast_get_min_split_addr(void)