mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/cmake_compiler_warn_write_string' into 'master'
Build: Fix CMake to pass -Wwrite-string compiler flag if enabled See merge request espressif/esp-idf!13852
This commit is contained in:
commit
f5f90abc95
@ -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()
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user