summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-daemon/mbedtls.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-daemon/mbedtls.patch')
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-daemon/mbedtls.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-daemon/mbedtls.patch b/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-daemon/mbedtls.patch
new file mode 100644
index 0000000000..be26a20dad
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-daemon/mbedtls.patch
@@ -0,0 +1,43 @@
+mbedtls: Disable documentation warning as error with clang
+
+There are shortcomings with doxygen info which clang-15+ flags, dont
+treat them as errors
+
+Remove unused variable
+
+Fixes
+library/bignum.c:1395:29: error: variable 't' set but not used [-Werror,-Wunused-but-set-variable]
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/third_party/mbedtls/repo/library/bignum.c
++++ b/third_party/mbedtls/repo/library/bignum.c
+@@ -1544,7 +1544,7 @@ __attribute__ ((noinline))
+ #endif
+ void mpi_mul_hlp( size_t i, mbedtls_mpi_uint *s, mbedtls_mpi_uint *d, mbedtls_mpi_uint b )
+ {
+- mbedtls_mpi_uint c = 0, t = 0;
++ mbedtls_mpi_uint c = 0;
+
+ #if defined(MULADDC_HUIT)
+ for( ; i >= 8; i -= 8 )
+@@ -1595,8 +1595,6 @@ void mpi_mul_hlp( size_t i, mbedtls_mpi_
+ }
+ #endif /* MULADDC_HUIT */
+
+- t++;
+-
+ do {
+ *d += c; c = ( *d < c ); d++;
+ }
+--- a/third_party/mbedtls/repo/CMakeLists.txt
++++ b/third_party/mbedtls/repo/CMakeLists.txt
+@@ -192,7 +192,7 @@ if(CMAKE_COMPILER_IS_GNU)
+ endif(CMAKE_COMPILER_IS_GNU)
+
+ if(CMAKE_COMPILER_IS_CLANG)
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wno-error=documentation")
+ set(CMAKE_C_FLAGS_RELEASE "-O2")
+ set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
+ set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage")