blob: be26a20dad95e7060b68358fb80594a6cdbf95e8 [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001mbedtls: Disable documentation warning as error with clang
2
3There are shortcomings with doxygen info which clang-15+ flags, dont
4treat them as errors
5
6Remove unused variable
7
8Fixes
9library/bignum.c:1395:29: error: variable 't' set but not used [-Werror,-Wunused-but-set-variable]
10
11Upstream-Status: Pending
12Signed-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;
20+ mbedtls_mpi_uint c = 0;
21
22 #if defined(MULADDC_HUIT)
23 for( ; i >= 8; i -= 8 )
24@@ -1595,8 +1595,6 @@ void mpi_mul_hlp( size_t i, mbedtls_mpi_
25 }
26 #endif /* MULADDC_HUIT */
27
28- t++;
29-
30 do {
31 *d += c; c = ( *d < c ); d++;
32 }
33--- a/third_party/mbedtls/repo/CMakeLists.txt
34+++ b/third_party/mbedtls/repo/CMakeLists.txt
35@@ -192,7 +192,7 @@ if(CMAKE_COMPILER_IS_GNU)
36 endif(CMAKE_COMPILER_IS_GNU)
37
38 if(CMAKE_COMPILER_IS_CLANG)
39- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla")
40+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wno-error=documentation")
41 set(CMAKE_C_FLAGS_RELEASE "-O2")
42 set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
43 set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage")