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:
Carles Cufi 2019-08-15 14:04:37 +02:00 committed by Carles Cufí
commit 76bfea7cf9

View file

@ -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);