diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b3d6f74b0..d0adb9bb17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,10 @@ if(CONFIG_COMPILER_DISABLE_GCC8_WARNINGS) "-Wno-int-in-bool-context") endif() +if(CONFIG_COMPILER_WARN_WRITE_STRINGS) + list(APPEND compile_options "-Wwrite-strings") +endif() + if(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE) list(APPEND compile_definitions "-DNDEBUG") endif() diff --git a/components/esp_hw_support/port/esp32s3/rtc_init.c b/components/esp_hw_support/port/esp32s3/rtc_init.c index 2aa7a3fd0a..2b12794731 100644 --- a/components/esp_hw_support/port/esp32s3/rtc_init.c +++ b/components/esp_hw_support/port/esp32s3/rtc_init.c @@ -27,7 +27,7 @@ #define RTC_CNTL_MEM_FORCE_NOISO (RTC_CNTL_SLOWMEM_FORCE_NOISO | RTC_CNTL_FASTMEM_FORCE_NOISO) -static char *TAG = "rtcinit"; +static const char *TAG = "rtcinit"; void rtc_init(rtc_config_t cfg) { diff --git a/components/wpa_supplicant/CMakeLists.txt b/components/wpa_supplicant/CMakeLists.txt index 3b35a84c8d..79503b7af0 100644 --- a/components/wpa_supplicant/CMakeLists.txt +++ b/components/wpa_supplicant/CMakeLists.txt @@ -157,7 +157,7 @@ idf_component_register(SRCS "${srcs}" "${tls_src}" "${roaming_src}" "${crypto_sr PRIV_INCLUDE_DIRS src src/utils PRIV_REQUIRES mbedtls esp_timer) -target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-strict-aliasing) +target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-strict-aliasing -Wno-write-strings) target_compile_definitions(${COMPONENT_LIB} PRIVATE __ets__ ESP_SUPPLICANT