From c9b62db723dee24d9009631b7e4152bda28ef4d5 Mon Sep 17 00:00:00 2001 From: yinshengkai Date: Mon, 13 May 2024 14:01:46 +0800 Subject: [PATCH] nimble: Ignore nimble compile warnings Will cause compilation warning if NDEBUG is defined We can't modify the code of the external library, so let's ignore it services/ans/src/ble_svc_ans.c:450:9: error: variable 'rc' set but not used [-Werror=unused-but-set-variable] 450 | int rc; | ^~ Signed-off-by: yinshengkai --- wireless/bluetooth/nimble/CMakeLists.txt | 2 +- wireless/bluetooth/nimble/Makefile.nimble | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wireless/bluetooth/nimble/CMakeLists.txt b/wireless/bluetooth/nimble/CMakeLists.txt index 86c370da0..586019767 100644 --- a/wireless/bluetooth/nimble/CMakeLists.txt +++ b/wireless/bluetooth/nimble/CMakeLists.txt @@ -194,6 +194,6 @@ if(CONFIG_NIMBLE) target_include_directories(nimble PUBLIC include ${INCLUDES}) target_compile_options(nimble PUBLIC -Wno-pointer-to-int-cast -Wno-undef - -Wno-format) + -Wno-format -Wno-unused-but-set-variable) target_sources(nimble PRIVATE ${SRCS}) endif() diff --git a/wireless/bluetooth/nimble/Makefile.nimble b/wireless/bluetooth/nimble/Makefile.nimble index e6d7fa456..adef4563b 100644 --- a/wireless/bluetooth/nimble/Makefile.nimble +++ b/wireless/bluetooth/nimble/Makefile.nimble @@ -66,4 +66,4 @@ CFLAGS += -Wno-pointer-to-int-cast -Wno-undef # disable printf format checks -CFLAGS += -Wno-format +CFLAGS += -Wno-format -Wno-unused-but-set-variable