From df59774eb50bc7fabaf9da026573e71e85dc2554 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Mon, 9 Jan 2023 21:07:57 +0300 Subject: [PATCH] Pointer<->Int casts are not constexpr (#8796) --- cores/esp8266/esp_priv.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cores/esp8266/esp_priv.h b/cores/esp8266/esp_priv.h index 305197e1c..6e11208bd 100644 --- a/cores/esp8266/esp_priv.h +++ b/cores/esp8266/esp_priv.h @@ -23,9 +23,8 @@ #if defined(CORE_MOCK) -constexpr bool __byteAddressable(const void* addr) +constexpr bool __byteAddressable(const void*) { - (void)addr; return true; } @@ -34,7 +33,7 @@ constexpr bool __byteAddressable(const void* addr) #include // returns true when addr can be used without "pgm_" functions or non32xfer service -constexpr bool __byteAddressable(const void* addr) +inline bool __byteAddressable(const void* addr) { return addr < (const void*)(XCHAL_DATARAM0_VADDR + XCHAL_DATARAM0_SIZE); }