Component/bt: fix build warning when bluedroid disable log
This commit is contained in:
@@ -711,6 +711,7 @@ extern void BTM_BleReadControllerFeatures(tBTM_BLE_CTRL_FEATURES_CBACK *p_vsc_c
|
||||
|
||||
void BTM_VendorHciEchoCmdCallback(tBTM_VSC_CMPL *p1)
|
||||
{
|
||||
#if (!CONFIG_BT_STACK_NO_LOG)
|
||||
if (!p1) {
|
||||
return;
|
||||
}
|
||||
@@ -718,6 +719,7 @@ void BTM_VendorHciEchoCmdCallback(tBTM_VSC_CMPL *p1)
|
||||
uint8_t status, echo;
|
||||
STREAM_TO_UINT8 (status, p);
|
||||
STREAM_TO_UINT8 (echo, p);
|
||||
#endif
|
||||
BTM_TRACE_DEBUG("%s status 0x%x echo 0x%x", __func__, status, echo);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,9 @@ const UINT8 btm_pm_md_comp_matrix[BTM_PM_NUM_SET_MODES * BTM_PM_NUM_SET_MODES] =
|
||||
/* function prototype */
|
||||
static int btm_pm_find_acl_ind(BD_ADDR remote_bda);
|
||||
static tBTM_STATUS btm_pm_snd_md_req( UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD *p_mode );
|
||||
#if (!CONFIG_BT_STACK_NO_LOG)
|
||||
static const char *mode_to_string(tBTM_PM_MODE mode);
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef BTM_PM_DEBUG
|
||||
@@ -950,6 +952,7 @@ tBTM_CONTRL_STATE BTM_PM_ReadControllerState(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if (!CONFIG_BT_STACK_NO_LOG)
|
||||
static const char *mode_to_string(tBTM_PM_MODE mode)
|
||||
{
|
||||
switch (mode) {
|
||||
@@ -960,3 +963,4 @@ static const char *mode_to_string(tBTM_PM_MODE mode)
|
||||
default: return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -949,7 +949,9 @@ tBTM_STATUS btm_sec_bond_by_transport (BD_ADDR bd_addr, tBT_TRANSPORT transport,
|
||||
{
|
||||
tBTM_SEC_DEV_REC *p_dev_rec;
|
||||
tBTM_STATUS status;
|
||||
#if (!CONFIG_BT_STACK_NO_LOG)
|
||||
UINT8 *p_features;
|
||||
#endif
|
||||
UINT8 ii;
|
||||
tACL_CONN *p = btm_bda_to_acl(bd_addr, transport);
|
||||
BTM_TRACE_API ("btm_sec_bond_by_transport BDA: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
@@ -1042,7 +1044,9 @@ tBTM_STATUS btm_sec_bond_by_transport (BD_ADDR bd_addr, tBT_TRANSPORT transport,
|
||||
}
|
||||
|
||||
for (ii = 0; ii <= HCI_EXT_FEATURES_PAGE_MAX; ii++) {
|
||||
#if (!CONFIG_BT_STACK_NO_LOG)
|
||||
p_features = p_dev_rec->features[ii];
|
||||
#endif
|
||||
BTM_TRACE_EVENT(" remote_features page[%1d] = %02x-%02x-%02x-%02x\n",
|
||||
ii, p_features[0], p_features[1], p_features[2], p_features[3]);
|
||||
BTM_TRACE_EVENT(" %02x-%02x-%02x-%02x\n",
|
||||
|
||||
@@ -437,6 +437,9 @@ void gap_attr_db_init(void)
|
||||
memset (&app_uuid.uu.uuid128, 0x81, LEN_UUID_128);
|
||||
|
||||
status = GATTS_StartService(gap_cb.gatt_if, service_handle, GAP_TRANSPORT_SUPPORTED );
|
||||
#if (CONFIG_BT_STACK_NO_LOG)
|
||||
(void) status;
|
||||
#endif
|
||||
|
||||
GAP_TRACE_EVENT ("GAP App gatt_if: %d s_hdl = %d start_status=%d",
|
||||
gap_cb.gatt_if, service_handle, status);
|
||||
|
||||
@@ -1169,6 +1169,10 @@ void GATT_SetIdleTimeout (BD_ADDR bd_addr, UINT16 idle_tout, tBT_TRANSPORT trans
|
||||
}
|
||||
}
|
||||
|
||||
#if (CONFIG_BT_STACK_NO_LOG)
|
||||
(void) status;
|
||||
#endif
|
||||
|
||||
GATT_TRACE_API ("GATT_SetIdleTimeout idle_tout=%d status=%d(1-OK 0-not performed)",
|
||||
idle_tout, status);
|
||||
}
|
||||
|
||||
@@ -374,6 +374,10 @@ void gatt_profile_db_init (void)
|
||||
*/
|
||||
status = GATTS_StartService (gatt_cb.gatt_if, service_handle, GATTP_TRANSPORT_SUPPORTED );
|
||||
|
||||
#if (CONFIG_BT_STACK_NO_LOG)
|
||||
(void) status;
|
||||
#endif
|
||||
|
||||
GATT_TRACE_DEBUG ("gatt_profile_db_init: gatt_if=%d start status%d\n",
|
||||
gatt_cb.gatt_if, status);
|
||||
}
|
||||
|
||||
@@ -2140,7 +2140,9 @@ void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_data)
|
||||
UINT8 op = p_clcb->operation, disc_type = GATT_DISC_MAX;
|
||||
tGATT_DISC_CMPL_CB *p_disc_cmpl_cb = (p_clcb->p_reg) ? p_clcb->p_reg->app_cb.p_disc_cmpl_cb : NULL;
|
||||
UINT16 conn_id;
|
||||
#if (!CONFIG_BT_STACK_NO_LOG)
|
||||
UINT8 operation;
|
||||
#endif
|
||||
|
||||
GATT_TRACE_DEBUG ("gatt_end_operation status=%d op=%d subtype=%d",
|
||||
status, p_clcb->operation, p_clcb->op_subtype);
|
||||
@@ -2182,7 +2184,10 @@ void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_data)
|
||||
osi_free(p_clcb->p_attr_buf);
|
||||
}
|
||||
|
||||
#if !CONFIG_BT_STACK_NO_LOG
|
||||
operation = p_clcb->operation;
|
||||
#endif
|
||||
|
||||
conn_id = p_clcb->conn_id;
|
||||
btu_stop_timer(&p_clcb->rsp_timer_ent);
|
||||
|
||||
|
||||
@@ -123,7 +123,10 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
|
||||
UINT8 pkt_type;
|
||||
tL2C_LCB *p_lcb;
|
||||
tL2C_CCB *p_ccb = NULL;
|
||||
UINT16 l2cap_len, rcv_cid, psm;
|
||||
UINT16 l2cap_len, rcv_cid;
|
||||
#if (!CONFIG_BT_STACK_NO_LOG)
|
||||
UINT16 psm;
|
||||
#endif
|
||||
UINT16 credit;
|
||||
|
||||
/* Extract the handle */
|
||||
@@ -228,7 +231,9 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
|
||||
//counter_add("l2cap.ch2.rx.bytes", l2cap_len);
|
||||
//counter_add("l2cap.ch2.rx.pkts", 1);
|
||||
/* process_connectionless_data (p_lcb); */
|
||||
#if !CONFIG_BT_STACK_NO_LOG
|
||||
STREAM_TO_UINT16 (psm, p);
|
||||
#endif
|
||||
L2CAP_TRACE_DEBUG( "GOT CONNECTIONLESS DATA PSM:%d", psm ) ;
|
||||
|
||||
#if (L2CAP_UCD_INCLUDED == TRUE)
|
||||
|
||||
@@ -586,14 +586,18 @@ void SMP_KeypressNotification (BD_ADDR bd_addr, UINT8 value)
|
||||
BOOLEAN SMP_CreateLocalSecureConnectionsOobData (tBLE_BD_ADDR *addr_to_send_to)
|
||||
{
|
||||
tSMP_CB *p_cb = &smp_cb;
|
||||
#if (!CONFIG_BT_STACK_NO_LOG)
|
||||
UINT8 *bd_addr;
|
||||
#endif
|
||||
|
||||
if (addr_to_send_to == NULL) {
|
||||
SMP_TRACE_ERROR ("%s addr_to_send_to is not provided", __FUNCTION__);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#if (!CONFIG_BT_STACK_NO_LOG)
|
||||
bd_addr = addr_to_send_to->bda;
|
||||
#endif
|
||||
|
||||
SMP_TRACE_EVENT ("%s addr type: %u, BDA: %08x%04x, state: %u, br_state: %u",
|
||||
__FUNCTION__, addr_to_send_to->type,
|
||||
|
||||
@@ -1151,9 +1151,10 @@ void smp_calculate_local_commitment(tSMP_CB *p_cb)
|
||||
switch (p_cb->selected_association_model) {
|
||||
case SMP_MODEL_SEC_CONN_JUSTWORKS:
|
||||
case SMP_MODEL_SEC_CONN_NUM_COMP:
|
||||
if (p_cb->role == HCI_ROLE_MASTER)
|
||||
if (p_cb->role == HCI_ROLE_MASTER) {
|
||||
SMP_TRACE_WARNING ("local commitment calc on master is not expected \
|
||||
for Just Works/Numeric Comparison models\n");
|
||||
}
|
||||
smp_calculate_f4(p_cb->loc_publ_key.x, p_cb->peer_publ_key.x, p_cb->rand, 0,
|
||||
p_cb->commitment);
|
||||
break;
|
||||
@@ -1196,9 +1197,10 @@ void smp_calculate_peer_commitment(tSMP_CB *p_cb, BT_OCTET16 output_buf)
|
||||
switch (p_cb->selected_association_model) {
|
||||
case SMP_MODEL_SEC_CONN_JUSTWORKS:
|
||||
case SMP_MODEL_SEC_CONN_NUM_COMP:
|
||||
if (p_cb->role == HCI_ROLE_SLAVE)
|
||||
if (p_cb->role == HCI_ROLE_SLAVE) {
|
||||
SMP_TRACE_WARNING ("peer commitment calc on slave is not expected \
|
||||
for Just Works/Numeric Comparison models\n");
|
||||
}
|
||||
smp_calculate_f4(p_cb->peer_publ_key.x, p_cb->loc_publ_key.x, p_cb->rrand, 0,
|
||||
output_buf);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user