mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Replace Werror removal with pragma
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
This commit is contained in:
@@ -271,6 +271,9 @@ function(set_gnu_base_compile_options target)
|
||||
target_compile_options(${target} PRIVATE $<$<CONFIG:Check>:-Os>)
|
||||
target_compile_options(${target} PRIVATE $<$<CONFIG:CheckFull>:-Os -Wcast-qual>)
|
||||
|
||||
if(MBEDTLS_FATAL_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE -Werror)
|
||||
endif(MBEDTLS_FATAL_WARNINGS)
|
||||
endfunction(set_gnu_base_compile_options)
|
||||
|
||||
function(set_clang_base_compile_options target)
|
||||
@@ -293,6 +296,9 @@ function(set_clang_base_compile_options target)
|
||||
set_target_properties(${target} PROPERTIES LINK_FLAGS_TSANDBG "-fsanitize=thread")
|
||||
target_compile_options(${target} PRIVATE $<$<CONFIG:Check>:-Os>)
|
||||
|
||||
if(MBEDTLS_FATAL_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE -Werror)
|
||||
endif(MBEDTLS_FATAL_WARNINGS)
|
||||
endfunction(set_clang_base_compile_options)
|
||||
|
||||
function(set_iar_base_compile_options target)
|
||||
@@ -300,6 +306,9 @@ function(set_iar_base_compile_options target)
|
||||
target_compile_options(${target} PRIVATE $<$<CONFIG:Release>:-Ohz>)
|
||||
target_compile_options(${target} PRIVATE $<$<CONFIG:Debug>:--debug -On>)
|
||||
|
||||
if(MBEDTLS_FATAL_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE --warnings_are_errors)
|
||||
endif(MBEDTLS_FATAL_WARNINGS)
|
||||
endfunction(set_iar_base_compile_options)
|
||||
|
||||
function(set_msvc_base_compile_options target)
|
||||
|
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "psa_util_internal.h"
|
||||
#include "psa/crypto.h"
|
||||
#pragma GCC diagnostic warning "-Wenum-conversion"
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
|
||||
/* Define a local translating function to save code size by not using too many
|
||||
* arguments in each translating place. */
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "psa/crypto.h"
|
||||
#include "psa_util_internal.h"
|
||||
#pragma GCC diagnostic warning "-Wenum-conversion"
|
||||
|
||||
#if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_EPHEMERAL_ENABLED)
|
||||
/* Define a local translating function to save code size by not using too many
|
||||
|
@@ -17,6 +17,8 @@
|
||||
* [SIRO] https://cabforum.org/wp-content/uploads/Chunghwatelecom201503cabforumV4.pdf
|
||||
*/
|
||||
|
||||
#pragma GCC diagnostic warning "-Wenum-conversion"
|
||||
|
||||
#include "x509_internal.h"
|
||||
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include <mbedtls/private/pk_private.h>
|
||||
#endif /* MBEDTLS_PK_HAVE_PRIVATE_HEADER */
|
||||
#include "mbedtls/psa_util.h"
|
||||
#pragma GCC diagnostic warning "-Wenum-conversion"
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
||||
defined(MBEDTLS_PEM_WRITE_C) && defined(MBEDTLS_X509_CSR_WRITE_C)
|
||||
|
Reference in New Issue
Block a user