From 77b0108afda3bb3264366d69fb7bd2c8b7ba920f Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Fri, 14 Jul 2017 15:19:12 +0200 Subject: [PATCH] Bluetooth: controller: Avoid warning with privacy disabled To avoid warnings (seen on some machines) that a function reaches its end without returning a value, conditionally compile the function in a way that this cannot happen. Signed-off-by: Carles Cufi --- subsys/bluetooth/controller/ll_sw/ll_filter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/ll_filter.c b/subsys/bluetooth/controller/ll_sw/ll_filter.c index ab382d3be20..54e4130ce8a 100644 --- a/subsys/bluetooth/controller/ll_sw/ll_filter.c +++ b/subsys/bluetooth/controller/ll_sw/ll_filter.c @@ -247,13 +247,14 @@ bool ctrl_irk_whitelisted(u8_t rl_idx) struct ll_filter *ctrl_filter_get(bool whitelist) { +#if defined(CONFIG_BLUETOOTH_CONTROLLER_PRIVACY) if (whitelist) { return &wl_filter; } -#if defined(CONFIG_BLUETOOTH_CONTROLLER_PRIVACY) return &rl_filter; #else - LL_ASSERT(0); + LL_ASSERT(whitelist); + return &wl_filter; #endif }