This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new c9b62db72 nimble: Ignore nimble compile warnings
c9b62db72 is described below

commit c9b62db723dee24d9009631b7e4152bda28ef4d5
Author: yinshengkai <yinsheng...@xiaomi.com>
AuthorDate: Mon May 13 14:01:46 2024 +0800

    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 <yinsheng...@xiaomi.com>
---
 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

Reply via email to