| Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 1 | mbedtls: Disable documentation warning as error with clang | 
|  | 2 |  | 
|  | 3 | There are shortcomings with doxygen info which clang-15+ flags, dont | 
|  | 4 | treat them as errors | 
|  | 5 |  | 
|  | 6 | Remove unused variable | 
|  | 7 |  | 
|  | 8 | Fixes | 
|  | 9 | library/bignum.c:1395:29: error: variable 't' set but not used [-Werror,-Wunused-but-set-variable] | 
|  | 10 |  | 
|  | 11 | Upstream-Status: Pending | 
|  | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 
|  | 13 | --- a/third_party/mbedtls/repo/library/bignum.c | 
|  | 14 | +++ b/third_party/mbedtls/repo/library/bignum.c | 
|  | 15 | @@ -1544,7 +1544,7 @@ __attribute__ ((noinline)) | 
|  | 16 | #endif | 
|  | 17 | void mpi_mul_hlp( size_t i, mbedtls_mpi_uint *s, mbedtls_mpi_uint *d, mbedtls_mpi_uint b ) | 
|  | 18 | { | 
|  | 19 | -    mbedtls_mpi_uint c = 0, t = 0; | 
| Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame^] | 20 | +    mbedtls_mpi_uint c = 0, t __attribute__ ((unused)) = 0; | 
| Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 21 |  | 
|  | 22 | #if defined(MULADDC_HUIT) | 
|  | 23 | for( ; i >= 8; i -= 8 ) | 
| Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 24 | --- a/third_party/mbedtls/repo/CMakeLists.txt | 
|  | 25 | +++ b/third_party/mbedtls/repo/CMakeLists.txt | 
|  | 26 | @@ -192,7 +192,7 @@ if(CMAKE_COMPILER_IS_GNU) | 
|  | 27 | endif(CMAKE_COMPILER_IS_GNU) | 
|  | 28 |  | 
|  | 29 | if(CMAKE_COMPILER_IS_CLANG) | 
|  | 30 | -    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla") | 
|  | 31 | +    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wno-error=documentation") | 
|  | 32 | set(CMAKE_C_FLAGS_RELEASE     "-O2") | 
|  | 33 | set(CMAKE_C_FLAGS_DEBUG       "-O0 -g3") | 
|  | 34 | set(CMAKE_C_FLAGS_COVERAGE    "-O0 -g3 --coverage") |