You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2019/03/07 15:24:19 UTC

[mynewt-nimble] branch master updated: clang: Fix "unused function" warnings

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

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 1613140  clang: Fix "unused function" warnings
     new e962353  Merge pull request #361 from ccollins476ad/clang
1613140 is described below

commit 16131409118bfed20914089524e68970abc3b598
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Mon Mar 4 15:14:45 2019 -0800

    clang: Fix "unused function" warnings
    
    Clang warns about some unused `static inline` functions.  Conditionally
    compile out these functions.
---
 nimble/controller/src/ble_ll_adv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nimble/controller/src/ble_ll_adv.c b/nimble/controller/src/ble_ll_adv.c
index 536a7b0..7af35c2 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -162,11 +162,13 @@ ble_ll_adv_active_chanset_is_pri(struct ble_ll_adv_sm *advsm)
     return (advsm->flags & BLE_LL_ADV_SM_FLAG_ACTIVE_CHANSET_MASK) == 0x10;
 }
 
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
 static inline int
 ble_ll_adv_active_chanset_is_sec(struct ble_ll_adv_sm *advsm)
 {
     return (advsm->flags & BLE_LL_ADV_SM_FLAG_ACTIVE_CHANSET_MASK) == 0x20;
 }
+#endif
 
 static inline void
 ble_ll_adv_active_chanset_clear(struct ble_ll_adv_sm *advsm)
@@ -182,6 +184,7 @@ ble_ll_adv_active_chanset_set_pri(struct ble_ll_adv_sm *advsm)
     advsm->flags |= 0x10;
 }
 
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
 static inline void
 ble_ll_adv_active_chanset_set_sec(struct ble_ll_adv_sm *advsm)
 {
@@ -189,6 +192,7 @@ ble_ll_adv_active_chanset_set_sec(struct ble_ll_adv_sm *advsm)
     advsm->flags &= ~BLE_LL_ADV_SM_FLAG_ACTIVE_CHANSET_MASK;
     advsm->flags |= 0x20;
 }
+#endif
 
 /* The advertising state machine global object */
 struct ble_ll_adv_sm g_ble_ll_adv_sm[BLE_ADV_INSTANCES];