Bluetooth: controller: Ensure that a case
statement is present
When compiling a sample like a beacon, none of the `if defined()` statements in the switch case are actually compiled in, so the compiler complains of an orphan mem_release();break; sequence. Add a type that we know will always be compiled in in order to avoid this issue. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
d3aa619f31
commit
76bfea7cf9
1 changed files with 5 additions and 1 deletions
|
@ -781,6 +781,11 @@ void ll_rx_mem_release(void **node_rx)
|
|||
case NODE_RX_TYPE_USER_START ... NODE_RX_TYPE_USER_END:
|
||||
#endif /* CONFIG_BT_CTLR_USER_EXT */
|
||||
|
||||
/* Ensure that at least one 'case' statement is present for this
|
||||
* code block.
|
||||
*/
|
||||
case NODE_RX_TYPE_NONE:
|
||||
LL_ASSERT(rx_free->type != NODE_RX_TYPE_NONE);
|
||||
mem_release(rx_free, &mem_pdu_rx.free);
|
||||
break;
|
||||
|
||||
|
@ -803,7 +808,6 @@ void ll_rx_mem_release(void **node_rx)
|
|||
break;
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
case NODE_RX_TYPE_NONE:
|
||||
case NODE_RX_TYPE_EVENT_DONE:
|
||||
default:
|
||||
LL_ASSERT(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue