From a9ea43bb168d35b6bd73f995d1f87e50deaf69d4 Mon Sep 17 00:00:00 2001 From: Pavlin Radoslavov Date: Mon, 15 Feb 2016 11:47:37 -0800 Subject: [PATCH] Fix compilation warnings/errors on fugu Fix compilation warnings/errors on fugu about unused variables. Change-Id: Ib68097122f27c631ab36b71a6815d4e1f3b60558 --- btif/src/btif_pan.c | 2 ++ stack/btm/btm_ble.c | 3 ++- stack/btm/btm_ble_gap.c | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/btif/src/btif_pan.c b/btif/src/btif_pan.c index 694086174..c430c46b8 100644 --- a/btif/src/btif_pan.c +++ b/btif/src/btif_pan.c @@ -213,8 +213,10 @@ static inline int btpan_role_to_bta(int btpan_role) } static volatile int btpan_dev_local_role; +#if BTA_PAN_INCLUDED == TRUE static tBTA_PAN_ROLE_INFO bta_panu_info = {PANU_SERVICE_NAME, 0, PAN_SECURITY}; static tBTA_PAN_ROLE_INFO bta_pan_nap_info = {PAN_NAP_SERVICE_NAME, 1, PAN_SECURITY}; +#endif static bt_status_t btpan_enable(int local_role) { diff --git a/stack/btm/btm_ble.c b/stack/btm/btm_ble.c index bab906b12..2b983f006 100644 --- a/stack/btm/btm_ble.c +++ b/stack/btm/btm_ble.c @@ -1738,10 +1738,11 @@ void btm_ble_conn_complete(UINT8 *p, UINT16 evt_len, BOOLEAN enhanced) { #if (BLE_PRIVACY_SPT == TRUE ) UINT8 *p_data = p, peer_addr_type; + BD_ADDR local_rpa, peer_rpa; #endif UINT8 role, status, bda_type; UINT16 handle; - BD_ADDR bda, local_rpa, peer_rpa; + BD_ADDR bda; UINT16 conn_interval, conn_latency, conn_timeout; BOOLEAN match = FALSE; UNUSED(evt_len); diff --git a/stack/btm/btm_ble_gap.c b/stack/btm/btm_ble_gap.c index d6423701f..286787ea2 100644 --- a/stack/btm/btm_ble_gap.c +++ b/stack/btm/btm_ble_gap.c @@ -920,6 +920,7 @@ tBTM_STATUS BTM_BleSetConnectableMode(tBTM_BLE_CONN_MODE connectable_mode) return btm_ble_set_connectability( p_cb->connectable_mode); } +#if BLE_PRIVACY_SPT == TRUE static bool is_resolving_list_bit_set(void *data, void *context) { tBTM_SEC_DEV_REC *p_dev_rec = data; @@ -929,6 +930,7 @@ static bool is_resolving_list_bit_set(void *data, void *context) return true; } +#endif /******************************************************************************* ** @@ -945,7 +947,9 @@ static UINT8 btm_set_conn_mode_adv_init_addr(tBTM_BLE_INQ_CB *p_cb, tBLE_ADDR_TYPE *p_own_addr_type) { UINT8 evt_type; - tBTM_SEC_DEV_REC *p_dev_rec; +#if BLE_PRIVACY_SPT == TRUE + tBTM_SEC_DEV_REC *p_dev_rec; +#endif evt_type = (p_cb->connectable_mode == BTM_BLE_NON_CONNECTABLE) ? \ ((p_cb->scan_rsp) ? BTM_BLE_DISCOVER_EVT : BTM_BLE_NON_CONNECT_EVT )\ -- 2.11.0