OSDN Git Service

Fix compilation warnings/errors on fugu
authorPavlin Radoslavov <pavlin@google.com>
Mon, 15 Feb 2016 19:47:37 +0000 (11:47 -0800)
committerPavlin Radoslavov <pavlin@google.com>
Mon, 15 Feb 2016 19:56:44 +0000 (11:56 -0800)
Fix compilation warnings/errors on fugu about unused
variables.

Change-Id: Ib68097122f27c631ab36b71a6815d4e1f3b60558

btif/src/btif_pan.c
stack/btm/btm_ble.c
stack/btm/btm_ble_gap.c

index 6940861..c430c46 100644 (file)
@@ -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)
 {
index bab906b..2b983f0 100644 (file)
@@ -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);
index d642370..286787e 100644 (file)
@@ -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 )\