controller/adv: fix 'unused function' warning#678
Conversation
nimble/controller/src/ble_ll_adv.c
Outdated
| #define SYNC_DATA_LEN(_advsm) \ | ||
| (_advsm->periodic_adv_data ? OS_MBUF_PKTLEN(advsm->periodic_adv_data) : 0) | ||
|
|
||
| #if defined (BLE_LL_CFG_FEAT_LL_EXT_ADV) || !defined(NDEBUG) |
There was a problem hiding this comment.
should be MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV) here
|
I have a bit of mixed feelings about this !define(NDEBUG), while in short term it is fine maybe in long term we should always use BLE_LL_ASSERT() and evaluate parameters but make it dead code for NDEBUG... |
|
we could also remove all those asserts for |
|
I share the same feeling about +1 for simply removing the asserts. @sjanc do you agree as well? If yes, I will adapt this PR. |
|
so how does this look? |
|
yeap, seems fine |
6f4219a to
5d71b24
Compare
|
perfect, squashed just in case @andrzej-kaczmarek likes it as well :-) |
|
try to merge or let me know in case you can't do it, I'll merge then |
|
I am still not allowed to merge, so please go ahead. Is there maybe anyone else I should contact regarding the repository permissions? |
|
@haukepetersen I gave you instruction whom to contact on the slack |
When compiling without the LL_EXT_ADV feature and with disabled assertions, the compiler throws an 'unused function' warning for the internal function `ble_ll_adv_active_chanset_is_pri()`. This commit fixes this by only compiling that functions if actually needed and removing some assertions that have never triggered.
5d71b24 to
c9255c6
Compare
|
rebased. Still working on getting the commit permissions - was occupied elsewhere the last weeks... |
When compiling without the LL_EXT_ADV feature and with disabled
assertions, the compiler throws an 'unused function' warning for
the internal function
ble_ll_adv_active_chanset_is_pri(). Thiscommit fixes this by only compiling that functions if actually
needed.