From 74e26f8d293cc91872f3d58bc5772c117d1c5736 Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Thu, 1 May 2025 11:05:38 +0700 Subject: [PATCH] fix(mbedtls): suppress -Wunterminated-string-initialization --- components/mbedtls/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/mbedtls/CMakeLists.txt b/components/mbedtls/CMakeLists.txt index 4308a0a7c9..eb4d5a7f06 100644 --- a/components/mbedtls/CMakeLists.txt +++ b/components/mbedtls/CMakeLists.txt @@ -347,6 +347,11 @@ foreach(target ${mbedtls_targets}) endif() endforeach() +if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 15.0) + target_compile_options(mbedtls PRIVATE "-Wno-unterminated-string-initialization") +endif() + + if(CONFIG_MBEDTLS_DYNAMIC_BUFFER) set(WRAP_FUNCTIONS mbedtls_ssl_write_client_hello