diff options
author | Paul Elliott <paul.elliott@arm.com> | 2020-12-17 18:38:04 +0000 |
---|---|---|
committer | Paul Elliott <paul.elliott@arm.com> | 2021-03-10 17:00:32 +0000 |
commit | 21c62a2aede0014e266c9bd9add0734c5a68c0da (patch) | |
tree | 3ce9aaf08d185a7d8ce37f31685e8ea87b72335d /CMakeLists.txt | |
parent | 3a5a107fa7ae1d3287dafe1ad21dbf5d6dadc7b5 (diff) | |
download | mbedtls-21c62a2aede0014e266c9bd9add0734c5a68c0da.zip mbedtls-21c62a2aede0014e266c9bd9add0734c5a68c0da.tar.gz mbedtls-21c62a2aede0014e266c9bd9add0734c5a68c0da.tar.bz2 |
Raise level of -Wformat-truncation to 2
This was not possible earlier due to warnings, however now this seems to
be ok.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c56fb77..2ab2e01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,8 +198,7 @@ if(CMAKE_COMPILER_IS_GNU) endif() endif() if (GCC_VERSION VERSION_GREATER 7.0 OR GCC_VERSION VERSION_EQUAL 7.0) - # Cannot use -Wformat-truncation=2 as this fails on mbedtls_snprintf (unknown buffer size) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-overflow=2 -Wformat-truncation") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-overflow=2 -Wformat-truncation=2") endif() set(CMAKE_C_FLAGS_RELEASE "-O2") set(CMAKE_C_FLAGS_DEBUG "-O0 -g3") |