From dd1d28b07a159a65fc82e9be6321565475a97b7a Mon Sep 17 00:00:00 2001 From: Michal Gorecki Date: Mon, 9 Sep 2024 14:38:34 +0200 Subject: [PATCH] nimble/host: Fix build for extended scan This eliminates "declared but not used" warnings. --- nimble/host/src/ble_gap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index e0ddb8859..39b6ace79 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -202,9 +202,11 @@ struct ble_gap_slave_state { static bssnz_t struct ble_gap_slave_state ble_gap_slave[BLE_ADV_INSTANCES]; +#if NIMBLE_BLE_ADVERTISE #if MYNEWT_VAL(BLE_EXT_ADV) static bool ext_adv_legacy_configured = false; #endif +#endif struct ble_gap_update_entry { SLIST_ENTRY(ble_gap_update_entry) next; @@ -2914,6 +2916,7 @@ done: #endif } +#if NIMBLE_BLE_ADVERTISE #if MYNEWT_VAL(BLE_EXT_ADV) static int ble_gap_ext_adv_legacy_preconfigure(void) @@ -2945,6 +2948,7 @@ ble_gap_ext_adv_legacy_preconfigure(void) return 0; } #endif +#endif int ble_gap_adv_set_data(const uint8_t *data, int data_len)