summaryrefslogtreecommitdiffstats
path: root/stack
diff options
context:
space:
mode:
Diffstat (limited to 'stack')
-rw-r--r--stack/avct/avct_api.c8
-rw-r--r--stack/avct/avct_l2c.c2
-rw-r--r--stack/avct/avct_lcb.c2
-rw-r--r--stack/avct/avct_lcb_act.c13
-rw-r--r--stack/avdt/avdt_ad.c2
-rw-r--r--stack/avdt/avdt_ccb.c3
-rw-r--r--stack/avdt/avdt_ccb_act.c21
-rw-r--r--stack/avdt/avdt_l2c.c4
-rw-r--r--stack/avdt/avdt_msg.c6
-rw-r--r--stack/avdt/avdt_scb.c2
-rw-r--r--stack/avdt/avdt_scb_act.c37
-rwxr-xr-xstack/avrc/avrc_bld_tg.c14
-rwxr-xr-xstack/avrc/avrc_pars_ct.c9
-rw-r--r--stack/bnep/bnep_main.c2
-rw-r--r--stack/bnep/bnep_utils.c2
-rw-r--r--stack/btm/btm_ble.c3
-rw-r--r--stack/btm/btm_ble_bgconn.c8
-rw-r--r--stack/btm/btm_ble_gap.c12
-rw-r--r--stack/btm/btm_devctl.c14
-rw-r--r--stack/btm/btm_pm.c3
-rw-r--r--stack/btm/btm_sco.c7
-rw-r--r--stack/btm/btm_sec.c12
-rw-r--r--stack/btu/btu_task.c1
-rw-r--r--stack/gap/gap_api.c5
-rw-r--r--stack/gap/gap_ble.c4
-rw-r--r--stack/gap/gap_conn.c2
-rw-r--r--stack/gap/gap_utils.c4
-rw-r--r--stack/gatt/gatt_attr.c3
-rw-r--r--stack/gatt/gatt_auth.c2
-rw-r--r--stack/gatt/gatt_main.c3
-rw-r--r--stack/gatt/gatt_sr.c14
-rw-r--r--stack/gatt/gatt_utils.c4
-rw-r--r--stack/hid/hidh_conn.c4
-rw-r--r--stack/l2cap/l2c_ble.c5
-rw-r--r--stack/l2cap/l2c_link.c5
-rw-r--r--stack/mcap/mca_cact.c9
-rw-r--r--stack/mcap/mca_dact.c5
-rw-r--r--stack/mcap/mca_l2c.c2
-rw-r--r--stack/pan/pan_main.c2
-rw-r--r--stack/rfcomm/port_rfc.c3
-rw-r--r--stack/rfcomm/rfc_l2cap_if.c3
-rw-r--r--stack/rfcomm/rfc_mx_fsm.c5
-rw-r--r--stack/rfcomm/rfc_port_fsm.c5
-rw-r--r--stack/rfcomm/rfc_port_if.c4
-rw-r--r--stack/rfcomm/rfc_utils.c2
-rw-r--r--stack/sdp/sdp_api.c3
-rw-r--r--stack/sdp/sdp_main.c3
-rw-r--r--stack/sdp/sdp_server.c3
-rw-r--r--stack/smp/smp_act.c32
-rw-r--r--stack/smp/smp_api.c2
-rw-r--r--stack/smp/smp_keys.c21
-rw-r--r--stack/smp/smp_utils.c21
-rw-r--r--stack/srvc/srvc_battery.c15
-rw-r--r--stack/srvc/srvc_dis.c5
-rw-r--r--stack/srvc/srvc_eng.c5
55 files changed, 366 insertions, 26 deletions
diff --git a/stack/avct/avct_api.c b/stack/avct/avct_api.c
index 7e37a908f..d590cb552 100644
--- a/stack/avct/avct_api.c
+++ b/stack/avct/avct_api.c
@@ -25,6 +25,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "gki.h"
#include "l2c_api.h"
#include "l2cdefs.h"
@@ -53,6 +54,8 @@ tAVCT_CB avct_cb;
*******************************************************************************/
void AVCT_Register(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask)
{
+ UNUSED(mtu_br);
+
AVCT_TRACE_API0("AVCT_Register");
/* register PSM with L2CAP */
@@ -289,6 +292,8 @@ UINT16 AVCT_CreateBrowse (UINT8 handle, UINT8 role)
return result;
#else
+ UNUSED(handle);
+ UNUSED(role);
return AVCT_NO_RESOURCES;
#endif
}
@@ -326,6 +331,7 @@ UINT16 AVCT_RemoveBrowse (UINT8 handle)
}
return result;
#else
+ UNUSED(handle);
return AVCT_NO_RESOURCES;
#endif
}
@@ -350,6 +356,8 @@ UINT16 AVCT_GetBrowseMtu (UINT8 handle)
{
peer_mtu = p_ccb->p_bcb->peer_mtu;
}
+#else
+ UNUSED(handle);
#endif
return peer_mtu;
}
diff --git a/stack/avct/avct_l2c.c b/stack/avct/avct_l2c.c
index ef0f5fce0..aabcd0e1c 100644
--- a/stack/avct/avct_l2c.c
+++ b/stack/avct/avct_l2c.c
@@ -25,6 +25,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "avct_api.h"
#include "avct_int.h"
#include "l2c_api.h"
@@ -105,6 +106,7 @@ void avct_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
tAVCT_LCB *p_lcb;
UINT16 result = L2CAP_CONN_OK;
tL2CAP_CFG_INFO cfg;
+ UNUSED(psm);
/* do we already have a channel for this peer? */
if ((p_lcb = avct_lcb_by_bd(bd_addr)) == NULL)
diff --git a/stack/avct/avct_lcb.c b/stack/avct/avct_lcb.c
index bb3f44774..6bc7e51e1 100644
--- a/stack/avct/avct_lcb.c
+++ b/stack/avct/avct_lcb.c
@@ -26,6 +26,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "avct_api.h"
#include "avct_int.h"
#include "gki.h"
@@ -351,6 +352,7 @@ void avct_lcb_dealloc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
BOOLEAN found = FALSE;
int i;
+ UNUSED(p_data);
AVCT_TRACE_DEBUG1("avct_lcb_dealloc %d", p_lcb->allocated);
diff --git a/stack/avct/avct_lcb_act.c b/stack/avct/avct_lcb_act.c
index b88351792..2fc92173e 100644
--- a/stack/avct/avct_lcb_act.c
+++ b/stack/avct/avct_lcb_act.c
@@ -25,6 +25,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "avct_api.h"
#include "avct_int.h"
#include "gki.h"
@@ -170,6 +171,7 @@ static BT_HDR *avct_lcb_msg_asmbl(tAVCT_LCB *p_lcb, BT_HDR *p_buf)
void avct_lcb_chnl_open(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
UINT16 result = AVCT_RESULT_FAIL;
+ UNUSED(p_data);
BTM_SetOutService(p_lcb->peer_addr, BTM_SEC_SERVICE_AVCTP, 0);
/* call l2cap connect req */
@@ -193,6 +195,8 @@ void avct_lcb_chnl_open(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
*******************************************************************************/
void avct_lcb_unbind_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
+ UNUSED(p_lcb);
+
avct_ccb_dealloc(p_data->p_ccb, AVCT_DISCONNECT_CFM_EVT, 0, NULL);
}
@@ -290,6 +294,7 @@ void avct_lcb_close_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
tAVCT_CCB *p_ccb = &avct_cb.ccb[0];
int i;
+ UNUSED(p_data);
for (i = 0; i < AVCT_NUM_CONN; i++, p_ccb++)
{
@@ -416,6 +421,8 @@ void avct_lcb_chk_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
*******************************************************************************/
void avct_lcb_chnl_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
+ UNUSED(p_data);
+
L2CA_DisconnectReq(p_lcb->ch_lcid);
}
@@ -432,6 +439,8 @@ void avct_lcb_chnl_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
*******************************************************************************/
void avct_lcb_bind_fail(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
+ UNUSED(p_lcb);
+
avct_ccb_dealloc(p_data->p_ccb, AVCT_CONNECT_CFM_EVT, AVCT_RESULT_FAIL, NULL);
}
@@ -488,6 +497,8 @@ void avct_lcb_cong_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
*******************************************************************************/
void avct_lcb_discard_msg(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
+ UNUSED(p_lcb);
+
AVCT_TRACE_WARNING0("Dropping msg");
GKI_freebuf(p_data->ul_msg.p_buf);
@@ -623,6 +634,8 @@ void avct_lcb_send_msg(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
*******************************************************************************/
void avct_lcb_free_msg_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
{
+ UNUSED(p_lcb);
+
if (p_data)
GKI_freebuf(p_data->p_buf);
return;
diff --git a/stack/avdt/avdt_ad.c b/stack/avdt/avdt_ad.c
index 92f429a53..7fe665cbf 100644
--- a/stack/avdt/avdt_ad.c
+++ b/stack/avdt/avdt_ad.c
@@ -25,6 +25,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "avdt_api.h"
#include "avdtc_api.h"
#include "avdt_int.h"
@@ -322,6 +323,7 @@ void avdt_ad_tc_close_ind(tAVDT_TC_TBL *p_tbl, UINT16 reason)
tAVDT_CCB *p_ccb;
tAVDT_SCB *p_scb;
tAVDT_SCB_TC_CLOSE close;
+ UNUSED(reason);
close.old_tc_state = p_tbl->state;
/* clear avdt_ad_tc_tbl entry */
diff --git a/stack/avdt/avdt_ccb.c b/stack/avdt/avdt_ccb.c
index f238c69a6..c2ef2f47a 100644
--- a/stack/avdt/avdt_ccb.c
+++ b/stack/avdt/avdt_ccb.c
@@ -26,6 +26,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "avdt_api.h"
#include "avdtc_api.h"
#include "avdt_int.h"
@@ -415,6 +416,8 @@ tAVDT_CCB *avdt_ccb_alloc(BD_ADDR bd_addr)
*******************************************************************************/
void avdt_ccb_dealloc(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
+ UNUSED(p_data);
+
AVDT_TRACE_DEBUG1("avdt_ccb_dealloc %d", avdt_ccb_to_idx(p_ccb));
btu_stop_timer(&p_ccb->timer_entry);
memset(p_ccb, 0, sizeof(tAVDT_CCB));
diff --git a/stack/avdt/avdt_ccb_act.c b/stack/avdt/avdt_ccb_act.c
index 12c11b4cb..1249c6386 100644
--- a/stack/avdt/avdt_ccb_act.c
+++ b/stack/avdt/avdt_ccb_act.c
@@ -26,6 +26,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "avdt_api.h"
#include "avdtc_api.h"
#include "avdt_int.h"
@@ -86,6 +87,8 @@ static void avdt_ccb_clear_ccb(tAVDT_CCB *p_ccb)
*******************************************************************************/
void avdt_ccb_chan_open(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
+ UNUSED(p_data);
+
BTM_SetOutService(p_ccb->peer_addr, BTM_SEC_SERVICE_AVDTP, AVDT_CHAN_SIG);
avdt_ad_open_req(AVDT_CHAN_SIG, p_ccb, NULL, AVDT_INT);
}
@@ -103,6 +106,8 @@ void avdt_ccb_chan_open(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
*******************************************************************************/
void avdt_ccb_chan_close(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
+ UNUSED(p_data);
+
/* close the transport channel used by this CCB */
avdt_ad_close_req(AVDT_CHAN_SIG, p_ccb, NULL);
}
@@ -122,6 +127,7 @@ void avdt_ccb_chk_close(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
int i;
tAVDT_SCB *p_scb = &avdt_cb.scb[0];
+ UNUSED(p_data);
/* see if there are any active scbs associated with this ccb */
for (i = 0; i < AVDT_NUM_SEPS; i++, p_scb++)
@@ -666,6 +672,7 @@ void avdt_ccb_clear_cmds(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
int i;
tAVDT_SCB *p_scb = &avdt_cb.scb[0];
UINT8 err_code = AVDT_ERR_CONNECT;
+ UNUSED(p_data);
/* clear the ccb */
avdt_ccb_clear_ccb(p_ccb);
@@ -754,6 +761,8 @@ void avdt_ccb_cmd_fail(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
*******************************************************************************/
void avdt_ccb_free_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
+ UNUSED(p_data);
+
if (p_ccb->p_curr_cmd != NULL)
{
GKI_freebuf(p_ccb->p_curr_cmd);
@@ -838,6 +847,7 @@ void avdt_ccb_ret_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
void avdt_ccb_snd_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
BT_HDR *p_msg;
+ UNUSED(p_data);
/* do we have commands to send? send next command; make sure we're clear;
** not congested, not sending fragment, not waiting for response
@@ -870,6 +880,7 @@ void avdt_ccb_snd_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
void avdt_ccb_snd_msg(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
BT_HDR *p_msg;
+ UNUSED(p_data);
/* if not congested */
if (!p_ccb->cong)
@@ -911,6 +922,8 @@ void avdt_ccb_snd_msg(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
*******************************************************************************/
void avdt_ccb_set_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
+ UNUSED(p_data);
+
p_ccb->reconn = TRUE;
}
@@ -926,6 +939,8 @@ void avdt_ccb_set_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
*******************************************************************************/
void avdt_ccb_clr_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
+ UNUSED(p_data);
+
p_ccb->reconn = FALSE;
}
@@ -944,6 +959,7 @@ void avdt_ccb_clr_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
void avdt_ccb_chk_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
UINT8 err_code = AVDT_ERR_CONNECT;
+ UNUSED(p_data);
if (p_ccb->reconn)
{
@@ -977,6 +993,8 @@ void avdt_ccb_chk_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
*******************************************************************************/
void avdt_ccb_chk_timer(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
+ UNUSED(p_data);
+
if (p_ccb->timer_entry.event == BTU_TTYPE_AVDT_CCB_IDLE)
{
btu_stop_timer(&p_ccb->timer_entry);
@@ -1036,6 +1054,8 @@ void avdt_ccb_set_disconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
*******************************************************************************/
void avdt_ccb_do_disconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
+ UNUSED(p_data);
+
/* clear any pending commands */
avdt_ccb_clear_cmds(p_ccb, NULL);
@@ -1058,6 +1078,7 @@ void avdt_ccb_ll_closed(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
tAVDT_CTRL_CBACK *p_cback;
BD_ADDR bd_addr;
tAVDT_CTRL avdt_ctrl;
+ UNUSED(p_data);
/* clear any pending commands */
avdt_ccb_clear_cmds(p_ccb, NULL);
diff --git a/stack/avdt/avdt_l2c.c b/stack/avdt/avdt_l2c.c
index 20979b4bd..2256a90b5 100644
--- a/stack/avdt/avdt_l2c.c
+++ b/stack/avdt/avdt_l2c.c
@@ -25,6 +25,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "avdt_api.h"
#include "avdtc_api.h"
#include "avdt_int.h"
@@ -74,6 +75,7 @@ static void avdt_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UIN
tAVDT_CCB *p_ccb = NULL;
tL2CAP_CFG_INFO cfg;
tAVDT_TC_TBL *p_tbl;
+ UNUSED(p_ref_data);
AVDT_TRACE_DEBUG1("avdt_sec_check_complete_term res: %d", res);
if (!bd_addr)
@@ -130,6 +132,7 @@ static void avdt_sec_check_complete_orig (BD_ADDR bd_addr, void *p_ref_data, UIN
tAVDT_CCB *p_ccb = NULL;
tL2CAP_CFG_INFO cfg;
tAVDT_TC_TBL *p_tbl;
+ UNUSED(p_ref_data);
AVDT_TRACE_DEBUG1("avdt_sec_check_complete_orig res: %d", res);
if (bd_addr)
@@ -174,6 +177,7 @@ void avdt_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
UINT16 result;
tL2CAP_CFG_INFO cfg;
tBTM_STATUS rc;
+ UNUSED(psm);
/* do we already have a control channel for this peer? */
if ((p_ccb = avdt_ccb_by_bd(bd_addr)) == NULL)
diff --git a/stack/avdt/avdt_msg.c b/stack/avdt/avdt_msg.c
index e3e4c9843..7b18424b7 100644
--- a/stack/avdt/avdt_msg.c
+++ b/stack/avdt/avdt_msg.c
@@ -29,6 +29,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "avdt_api.h"
#include "avdtc_api.h"
#include "avdt_int.h"
@@ -373,6 +374,8 @@ static void avdt_msg_bld_cfg(UINT8 **p, tAVDT_CFG *p_cfg)
*******************************************************************************/
static void avdt_msg_bld_none(UINT8 **p, tAVDT_MSG *p_msg)
{
+ UNUSED(p);
+ UNUSED(p_msg);
return;
}
@@ -775,6 +778,9 @@ static UINT8 avdt_msg_prs_cfg(tAVDT_CFG *p_cfg, UINT8 *p, UINT16 len, UINT8* p_e
*******************************************************************************/
static UINT8 avdt_msg_prs_none(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
{
+ UNUSED(p_msg);
+ UNUSED(p);
+ UNUSED(len);
return 0;
}
diff --git a/stack/avdt/avdt_scb.c b/stack/avdt/avdt_scb.c
index 0536d9125..d0c9e0fe2 100644
--- a/stack/avdt/avdt_scb.c
+++ b/stack/avdt/avdt_scb.c
@@ -26,6 +26,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "avdt_api.h"
#include "avdtc_api.h"
#include "avdt_int.h"
@@ -647,6 +648,7 @@ void avdt_scb_dealloc(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
#if AVDT_MULTIPLEXING == TRUE
void *p_buf;
#endif
+ UNUSED(p_data);
AVDT_TRACE_DEBUG1("avdt_scb_dealloc hdl=%d", avdt_scb_to_hdl(p_scb));
btu_stop_timer(&p_scb->timer_entry);
diff --git a/stack/avdt/avdt_scb_act.c b/stack/avdt/avdt_scb_act.c
index 66f9b7d3c..8175b96aa 100644
--- a/stack/avdt/avdt_scb_act.c
+++ b/stack/avdt/avdt_scb_act.c
@@ -26,6 +26,7 @@
#include <string.h>
#include "data_types.h"
#include "bt_target.h"
+#include "bt_utils.h"
#include "avdt_api.h"
#include "avdtc_api.h"
#include "avdt_int.h"
@@ -103,6 +104,8 @@ void avdt_scb_hdl_abort_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_hdl_abort_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_scb);
+ UNUSED(p_data);
return;
}
@@ -167,6 +170,8 @@ void avdt_scb_hdl_getconfig_cmd(tAVDT_SCB *p_scb,tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_hdl_getconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_scb);
+ UNUSED(p_data);
return;
}
@@ -215,6 +220,8 @@ void avdt_scb_hdl_open_rej(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_hdl_open_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_data);
+
/* initiate opening of trans channels for this SEID */
p_scb->role = AVDT_OPEN_INT;
avdt_ad_open_req(AVDT_CHAN_MEDIA, p_scb->p_ccb, p_scb, AVDT_INT);
@@ -668,6 +675,8 @@ void avdt_scb_hdl_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_drop_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_scb);
+
GKI_freebuf(p_data->p_pkt);
AVDT_TRACE_WARNING0("Dropped incoming media packet");
}
@@ -874,6 +883,7 @@ void avdt_scb_hdl_setconfig_rej(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
void avdt_scb_hdl_setconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_EVT_HDR single;
+ UNUSED(p_data);
if (p_scb->p_ccb != NULL)
{
@@ -898,6 +908,8 @@ void avdt_scb_hdl_setconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_hdl_start_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_data);
+
(*p_scb->cs.p_ctrl_cback)(avdt_scb_to_hdl(p_scb),
p_scb->p_ccb ? p_scb->p_ccb->peer_addr : NULL,
AVDT_START_IND_EVT,
@@ -934,6 +946,8 @@ void avdt_scb_hdl_start_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_hdl_suspend_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_data);
+
(*p_scb->cs.p_ctrl_cback)(avdt_scb_to_hdl(p_scb),
p_scb->p_ccb ? p_scb->p_ccb->peer_addr : NULL,
AVDT_SUSPEND_IND_EVT,
@@ -1344,6 +1358,7 @@ void avdt_scb_hdl_write_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
void avdt_scb_snd_abort_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_EVT_HDR hdr;
+ UNUSED(p_data);
if (p_scb->p_ccb != NULL)
{
@@ -1366,6 +1381,8 @@ void avdt_scb_snd_abort_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_snd_abort_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_scb);
+
avdt_msg_send_rsp(avdt_ccb_by_idx(p_data->msg.hdr.ccb_idx), AVDT_SIG_ABORT,
&p_data->msg);
}
@@ -1382,6 +1399,7 @@ void avdt_scb_snd_abort_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
void avdt_scb_snd_close_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_EVT_HDR hdr;
+ UNUSED(p_data);
p_scb->role = AVDT_CLOSE_INT;
@@ -1452,6 +1470,7 @@ void avdt_scb_snd_close_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
void avdt_scb_snd_getconfig_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_EVT_HDR hdr;
+ UNUSED(p_data);
hdr.seid = p_scb->peer_seid;
@@ -1484,6 +1503,7 @@ void avdt_scb_snd_getconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
void avdt_scb_snd_open_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_EVT_HDR hdr;
+ UNUSED(p_data);
hdr.seid = p_scb->peer_seid;
@@ -1696,6 +1716,8 @@ void avdt_scb_snd_setconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_snd_tc_close(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_data);
+
#if AVDT_REPORTING == TRUE
if(p_scb->curr_cfg.psc_mask & AVDT_PSC_REPORT)
avdt_ad_close_req(AVDT_CHAN_REPORT, p_scb->p_ccb, p_scb);
@@ -1716,6 +1738,7 @@ void avdt_scb_snd_tc_close(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
void avdt_scb_cb_err(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_CTRL avdt_ctrl;
+ UNUSED(p_data);
/* set error code and parameter */
avdt_ctrl.hdr.err_code = AVDT_ERR_BAD_STATE;
@@ -1755,6 +1778,8 @@ void avdt_scb_cong_state(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_rej_state(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_scb);
+
p_data->msg.hdr.err_code = AVDT_ERR_BAD_STATE;
p_data->msg.hdr.err_param = 0;
avdt_msg_send_rej(avdt_ccb_by_idx(p_data->msg.hdr.ccb_idx),
@@ -1773,6 +1798,8 @@ void avdt_scb_rej_state(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_rej_in_use(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_scb);
+
p_data->msg.hdr.err_code = AVDT_ERR_IN_USE;
p_data->msg.hdr.err_param = 0;
avdt_msg_send_rej(avdt_ccb_by_idx(p_data->msg.hdr.ccb_idx),
@@ -1791,6 +1818,8 @@ void avdt_scb_rej_in_use(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_rej_not_in_use(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_scb);
+
p_data->msg.hdr.err_code = AVDT_ERR_NOT_IN_USE;
p_data->msg.hdr.err_param = 0;
avdt_msg_send_rej(avdt_ccb_by_idx(p_data->msg.hdr.ccb_idx),
@@ -1808,6 +1837,8 @@ void avdt_scb_rej_not_in_use(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_set_remove(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_data);
+
p_scb->remove = TRUE;
}
@@ -1866,6 +1897,7 @@ void avdt_scb_clr_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
#if AVDT_MULTIPLEXING == TRUE
BT_HDR *p_frag;
#endif
+ UNUSED(p_data);
/* set error code and parameter */
avdt_ctrl.hdr.err_code = AVDT_ERR_BAD_STATE;
@@ -1930,6 +1962,7 @@ void avdt_scb_chk_snd_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
UINT8 res = AVDT_AD_SUCCESS;
tAVDT_SCB_EVT data;
#endif
+ UNUSED(p_data);
avdt_ctrl.hdr.err_code = 0;
@@ -2003,6 +2036,8 @@ void avdt_scb_chk_snd_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_tc_timer(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_data);
+
btu_start_timer(&p_scb->timer_entry, BTU_TTYPE_AVDT_SCB_TC, AVDT_SCB_TC_DISC_TOUT);
}
@@ -2017,6 +2052,8 @@ void avdt_scb_tc_timer(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
*******************************************************************************/
void avdt_scb_clr_vars(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
+ UNUSED(p_data);
+
p_scb->in_use = FALSE;
p_scb->p_ccb = NULL;
p_scb->peer_seid = 0;
diff --git a/stack/avrc/avrc_bld_tg.c b/stack/avrc/avrc_bld_tg.c
index d201b9dc2..6fe645ae6 100755
--- a/stack/avrc/avrc_bld_tg.c
+++ b/stack/avrc/avrc_bld_tg.c
@@ -21,6 +21,7 @@
#include "avrc_api.h"
#include "avrc_defs.h"
#include "avrc_int.h"
+#include "bt_utils.h"
/*****************************************************************************
** Global data
@@ -276,6 +277,9 @@ static tAVRC_STS avrc_bld_get_cur_app_setting_value_rsp (tAVRC_GET_CUR_APP_VALUE
*******************************************************************************/
static tAVRC_STS avrc_bld_set_app_setting_value_rsp (tAVRC_RSP *p_rsp, BT_HDR *p_pkt)
{
+ UNUSED(p_rsp);
+ UNUSED(p_pkt);
+
/* nothing to be added. */
AVRC_TRACE_API0("avrc_bld_set_app_setting_value_rsp");
return AVRC_STS_NO_ERROR;
@@ -401,6 +405,9 @@ static tAVRC_STS avrc_bld_get_app_setting_value_text_rsp (tAVRC_GET_APP_ATTR_TXT
*******************************************************************************/
static tAVRC_STS avrc_bld_inform_charset_rsp (tAVRC_RSP *p_rsp, BT_HDR *p_pkt)
{
+ UNUSED(p_rsp);
+ UNUSED(p_pkt);
+
/* nothing to be added. */
AVRC_TRACE_API0("avrc_bld_inform_charset_rsp");
return AVRC_STS_NO_ERROR;
@@ -419,6 +426,9 @@ static tAVRC_STS avrc_bld_inform_charset_rsp (tAVRC_RSP *p_rsp, BT_HDR *p_pkt)
*******************************************************************************/
static tAVRC_STS avrc_bld_inform_battery_status_rsp (tAVRC_RSP *p_rsp, BT_HDR *p_pkt)
{
+ UNUSED(p_rsp);
+ UNUSED(p_pkt);
+
/* nothing to be added. */
AVRC_TRACE_API0("avrc_bld_inform_battery_status_rsp");
return AVRC_STS_NO_ERROR;
@@ -653,6 +663,9 @@ static tAVRC_STS avrc_bld_notify_rsp (tAVRC_REG_NOTIF_RSP *p_rsp, BT_HDR *p_pkt)
*******************************************************************************/
static tAVRC_STS avrc_bld_next_rsp (tAVRC_RSP *p_rsp, BT_HDR *p_pkt)
{
+ UNUSED(p_rsp);
+ UNUSED(p_pkt);
+
/* nothing to be added. */
AVRC_TRACE_API0("avrc_bld_next_rsp");
return AVRC_STS_NO_ERROR;
@@ -800,6 +813,7 @@ tAVRC_STS AVRC_BldResponse( UINT8 handle, tAVRC_RESPONSE *p_rsp, BT_HDR **pp_pkt
tAVRC_STS status = AVRC_STS_BAD_PARAM;
BT_HDR *p_pkt;
BOOLEAN alloc = FALSE;
+ UNUSED(handle);
if (!p_rsp || !pp_pkt)
{
diff --git a/stack/avrc/avrc_pars_ct.c b/stack/avrc/avrc_pars_ct.c
index 85a9233b6..f3b4af553 100755
--- a/stack/avrc/avrc_pars_ct.c
+++ b/stack/avrc/avrc_pars_ct.c
@@ -21,6 +21,7 @@
#include "avrc_api.h"
#include "avrc_defs.h"
#include "avrc_int.h"
+#include "bt_utils.h"
/*****************************************************************************
** Global data
@@ -39,7 +40,7 @@
** Otherwise, the error code defined by AVRCP 1.4
**
*******************************************************************************/
-static tAVRC_STS avrc_pars_vendor_rsp(tAVRC_MSG_VENDOR *p_msg, tAVRC_RESPONSE *p_result, UINT8 *p_buf, UINT16 buf_len)
+static tAVRC_STS avrc_pars_vendor_rsp(tAVRC_MSG_VENDOR *p_msg, tAVRC_RESPONSE *p_result)
{
tAVRC_STS status = AVRC_STS_NO_ERROR;
UINT8 *p = p_msg->p_vendor_data;
@@ -117,13 +118,15 @@ tAVRC_STS AVRC_ParsResponse (tAVRC_MSG *p_msg, tAVRC_RESPONSE *p_result, UINT8 *
{
tAVRC_STS status = AVRC_STS_INTERNAL_ERR;
UINT16 id;
+ UNUSED(p_buf);
+ UNUSED(buf_len);
if (p_msg && p_result)
{
switch (p_msg->hdr.opcode)
{
case AVRC_OP_VENDOR: /* 0x00 Vendor-dependent commands */
- status = avrc_pars_vendor_rsp(&p_msg->vendor, p_result, p_buf, buf_len);
+ status = avrc_pars_vendor_rsp(&p_msg->vendor, p_result);
break;
case AVRC_OP_PASS_THRU: /* 0x7C panel subunit opcode */
@@ -139,7 +142,7 @@ tAVRC_STS AVRC_ParsResponse (tAVRC_MSG *p_msg, tAVRC_RESPONSE *p_result, UINT8 *
break;
}
p_result->rsp.opcode = p_msg->hdr.opcode;
- p_result->rsp.status = status;
+ p_result->rsp.status = status;
}
return status;
}
diff --git a/stack/bnep/bnep_main.c b/stack/bnep/bnep_main.c
index 12c9da03f..45d3b1493 100644
--- a/stack/bnep/bnep_main.c
+++ b/stack/bnep/bnep_main.c
@@ -41,6 +41,7 @@
#include "bnep_api.h"
#include "bnep_int.h"
+#include "bt_utils.h"
/********************************************************************************/
@@ -120,6 +121,7 @@ tBNEP_RESULT bnep_register_with_l2cap (void)
static void bnep_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UINT8 l2cap_id)
{
tBNEP_CONN *p_bcb = bnepu_find_bcb_by_bd_addr (bd_addr);
+ UNUSED(psm);
/* If we are not acting as server, or already have a connection, or have */
/* no more resources to handle the connection, reject the connection. */
diff --git a/stack/bnep/bnep_utils.c b/stack/bnep/bnep_utils.c
index 205eeeb54..0a8fd6d33 100644
--- a/stack/bnep/bnep_utils.c
+++ b/stack/bnep/bnep_utils.c
@@ -29,6 +29,7 @@
#include "bnep_int.h"
#include "btu.h"
#include "btm_int.h"
+#include "bt_utils.h"
/********************************************************************************/
@@ -1213,6 +1214,7 @@ void bnep_sec_check_complete (BD_ADDR bd_addr, void *p_ref_data, UINT8 result)
tBNEP_CONN *p_bcb = (tBNEP_CONN *)p_ref_data;
UINT16 resp_code = BNEP_SETUP_CONN_OK;
BOOLEAN is_role_change;
+ UNUSED(bd_addr);
BNEP_TRACE_EVENT1 ("BNEP security callback returned result %d", result);
if (p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED)
diff --git a/stack/btm/btm_ble.c b/stack/btm/btm_ble.c
index 6f2f454f6..0db65e48d 100644
--- a/stack/btm/btm_ble.c
+++ b/stack/btm/btm_ble.c
@@ -33,6 +33,7 @@
#include "smp_api.h"
#include "l2c_int.h"
#include "gap_api.h"
+#include "bt_utils.h"
#if SMP_INCLUDED == TRUE
extern BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length, UINT16 tlen, UINT8 *p_signature);
@@ -1507,6 +1508,7 @@ void btm_ble_connected (UINT8 *bda, UINT16 handle, UINT8 enc_mode, UINT8 role,
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bda);
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
+ UNUSED(addr_matched);
BTM_TRACE_EVENT0 ("btm_ble_connected");
@@ -1568,6 +1570,7 @@ void btm_ble_conn_complete(UINT8 *p, UINT16 evt_len)
BD_ADDR bda;
UINT16 conn_interval, conn_latency, conn_timeout;
BOOLEAN match = FALSE;
+ UNUSED(evt_len);
STREAM_TO_UINT8 (status, p);
STREAM_TO_UINT16 (handle, p);
diff --git a/stack/btm/btm_ble_bgconn.c b/stack/btm/btm_ble_bgconn.c
index 727390c55..96d35c4c5 100644
--- a/stack/btm/btm_ble_bgconn.c
+++ b/stack/btm/btm_ble_bgconn.c
@@ -29,7 +29,7 @@
#include "btm_int.h"
#include "l2c_int.h"
#include "hcimsgs.h"
-
+#include "bt_utils.h"
#ifndef BTM_BLE_SCAN_PARAM_TOUT
#define BTM_BLE_SCAN_PARAM_TOUT 50 /* 50 seconds */
@@ -73,6 +73,7 @@ BOOLEAN btm_add_dev_to_controller (BOOLEAN to_add, BD_ADDR bd_addr, UINT8 attr)
BOOLEAN started = FALSE;
BD_ADDR dummy_bda = {0};
tBT_DEVICE_TYPE dev_type;
+ UNUSED(attr);
if (p_dev_rec != NULL &&
p_dev_rec->device_type == BT_DEVICE_TYPE_BLE)
@@ -227,6 +228,8 @@ void btm_ble_clear_white_list_complete(UINT8 *p_data, UINT16 evt_len)
{
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
UINT8 status;
+ UNUSED(evt_len);
+
BTM_TRACE_EVENT0 ("btm_ble_clear_white_list_complete");
STREAM_TO_UINT8 (status, p_data);
@@ -259,6 +262,8 @@ void btm_ble_add_2_white_list_complete(UINT8 status)
void btm_ble_remove_from_white_list_complete(UINT8 *p, UINT16 evt_len)
{
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
+ UNUSED(evt_len);
+
BTM_TRACE_EVENT0 ("btm_ble_remove_from_white_list_complete");
if (*p == HCI_SUCCESS)
{
@@ -299,6 +304,7 @@ BOOLEAN btm_update_bg_conn_list(BOOLEAN to_add, BD_ADDR bd_addr, UINT8 *p_attr_t
tBTM_LE_BG_CONN_DEV *p_bg_dev = &p_cb->bg_dev_list[0], *p_next, *p_cur;
UINT8 i, j;
BOOLEAN ret = FALSE;
+ UNUSED(p_attr_tag);
BTM_TRACE_EVENT0 ("btm_update_bg_conn_list");
diff --git a/stack/btm/btm_ble_gap.c b/stack/btm/btm_ble_gap.c
index bfe5fda08..5e5b5dba4 100644
--- a/stack/btm/btm_ble_gap.c
+++ b/stack/btm/btm_ble_gap.c
@@ -27,6 +27,7 @@
#include <stddef.h>
#include "bt_types.h"
+#include "bt_utils.h"
#include "btu.h"
#include "btm_int.h"
#include "hcimsgs.h"
@@ -85,7 +86,10 @@ void BTM_BleReset(void)
*******************************************************************************/
BOOLEAN BTM_BleUpdateAdvWhitelist(BOOLEAN add_remove, BD_ADDR remote_bda)
{
- return FALSE;
+ UNUSED(add_remove);
+ UNUSED(remote_bda);
+
+ return FALSE;
}
/*******************************************************************************
@@ -279,6 +283,8 @@ void BTM_RegisterScanReqEvt(tBTM_BLE_SCAN_REQ_CBACK *p_scan_req_cback)
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
p_cb->p_scan_req_cback = p_scan_req_cback;
}
+#else
+ UNUSED(p_scan_req_cback);
#endif
}
@@ -1391,6 +1397,7 @@ void btm_ble_cache_adv_data(tBTM_INQ_RESULTS *p_cur, UINT8 data_len, UINT8 *p, U
tBTM_BLE_INQ_CB *p_le_inq_cb = &btm_cb.ble_ctr_cb.inq_var;
UINT8 *p_cache;
UINT8 length;
+ UNUSED(p_cur);
/* cache adv report/scan response data */
if (evt_type != BTM_BLE_SCAN_RSP_EVT)
@@ -1619,6 +1626,7 @@ void btm_send_sel_conn_callback(BD_ADDR remote_bda, UINT8 evt_type, UINT8 *p_dat
{
UINT8 data_len, len;
UINT8 *p_dev_name, remname[31] = {0};
+ UNUSED(addr_type);
if (btm_cb.ble_ctr_cb.p_select_cback == NULL ||
/* non-connectable device */
@@ -2032,6 +2040,8 @@ void btm_ble_update_mode_operation(UINT8 link_role, BD_ADDR bd_addr, BOOLEAN con
tACL_CONN *pa = &btm_cb.acl_db[0];
UINT16 xx;
UINT8 dev_role = link_role;
+ UNUSED(bd_addr);
+ UNUSED(conn_cancel);
BTM_TRACE_DEBUG1("btm_ble_update_mode_operation adv_mode = %d", btm_cb.ble_ctr_cb.inq_var.adv_mode );
diff --git a/stack/btm/btm_devctl.c b/stack/btm/btm_devctl.c
index 64c821ac6..240bd2fed 100644
--- a/stack/btm/btm_devctl.c
+++ b/stack/btm/btm_devctl.c
@@ -29,6 +29,7 @@
#include <stddef.h>
#include "bt_types.h"
+#include "bt_utils.h"
#include "hcimsgs.h"
#include "btu.h"
#include "btm_int.h"
@@ -729,6 +730,7 @@ void btm_read_hci_buf_size_complete (UINT8 *p, UINT16 evt_len)
UINT16 lm_num_acl_bufs;
UINT16 lm_num_sco_bufs;
UINT16 acl_buf_size;
+ UNUSED(evt_len);
STREAM_TO_UINT8 (status, p);
if (status == HCI_SUCCESS)
@@ -790,8 +792,9 @@ void btm_read_ble_buf_size_complete (UINT8 *p, UINT16 evt_len)
{
UINT8 status;
UINT16 lm_num_le_bufs;
+ UNUSED(evt_len);
- BTM_TRACE_DEBUG0("btm_read_ble_buf_size_complete ");
+ BTM_TRACE_DEBUG0("btm_read_ble_buf_size_complete ");
STREAM_TO_UINT8 (status, p);
if (status == HCI_SUCCESS)
{
@@ -823,6 +826,7 @@ void btm_read_ble_buf_size_complete (UINT8 *p, UINT16 evt_len)
void btm_read_ble_local_supported_features_complete (UINT8 *p, UINT16 evt_len)
{
UINT8 status;
+ UNUSED(evt_len);
BTM_TRACE_DEBUG0("btm_read_ble_local_supported_features_complete ");
@@ -860,8 +864,9 @@ void btm_read_ble_local_supported_features_complete (UINT8 *p, UINT16 evt_len)
void btm_read_white_list_size_complete(UINT8 *p, UINT16 evt_len)
{
UINT8 status;
+ UNUSED(evt_len);
- BTM_TRACE_DEBUG0("btm_read_white_list_size_complete ");
+ BTM_TRACE_DEBUG0("btm_read_white_list_size_complete ");
STREAM_TO_UINT8 (status, p);
if (status == HCI_SUCCESS)
@@ -888,6 +893,7 @@ void btm_read_local_version_complete (UINT8 *p, UINT16 evt_len)
{
tBTM_VERSION_INFO *p_vi = &btm_cb.devcb.local_version;
UINT8 status;
+ UNUSED(evt_len);
#ifdef BTA_PRM_CHECK_FW_VER
if(BTA_PRM_CHECK_FW_VER(p))
@@ -1326,6 +1332,7 @@ void btm_read_local_features_complete (UINT8 *p, UINT16 evt_len)
{
tBTM_DEVCB *p_devcb = &btm_cb.devcb;
UINT8 status;
+ UNUSED(evt_len);
btu_stop_timer (&p_devcb->reset_timer);
@@ -1369,6 +1376,7 @@ void btm_read_local_ext_features_complete (UINT8 *p, UINT16 evt_len)
UINT8 status;
UINT8 page_number;
UINT8 page_number_max;
+ UNUSED(evt_len);
btu_stop_timer (&btm_cb.devcb.reset_timer);
@@ -1644,6 +1652,7 @@ void btm_read_local_name_complete (UINT8 *p, UINT16 evt_len)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_rln_cmpl_cb;
UINT8 status;
+ UNUSED(evt_len);
btu_stop_timer (&btm_cb.devcb.rln_timer);
@@ -1708,6 +1717,7 @@ tBTM_STATUS BTM_ReadLocalDeviceAddr (tBTM_CMPL_CB *p_cb)
void btm_read_local_addr_complete (UINT8 *p, UINT16 evt_len)
{
UINT8 status;
+ UNUSED(evt_len);
STREAM_TO_UINT8 (status, p);
diff --git a/stack/btm/btm_pm.c b/stack/btm/btm_pm.c
index 925e69f89..02e3a6a92 100644
--- a/stack/btm/btm_pm.c
+++ b/stack/btm/btm_pm.c
@@ -40,7 +40,7 @@
#include "btm_int.h"
#include "l2c_int.h"
#include "hcidefs.h"
-
+#include "bt_utils.h"
#if BTM_PWR_MGR_INCLUDED == TRUE
@@ -923,6 +923,7 @@ void btm_pm_proc_ssr_evt (UINT8 *p, UINT16 evt_len)
tBTM_PM_MCB *p_cb;
tACL_CONN *p_acl=NULL;
UINT16 use_ssr = TRUE;
+ UNUSED(evt_len);
STREAM_TO_UINT8 (status, p);
diff --git a/stack/btm/btm_sco.c b/stack/btm/btm_sco.c
index 3eb010c58..2200b7119 100644
--- a/stack/btm/btm_sco.c
+++ b/stack/btm/btm_sco.c
@@ -33,6 +33,7 @@
#include "btm_api.h"
#include "btm_int.h"
#include "hcidefs.h"
+#include "bt_utils.h"
#if BTM_SCO_INCLUDED == TRUE
@@ -93,7 +94,11 @@ void btm_sco_flush_sco_data(UINT16 sco_inx)
GKI_freebuf (p_buf);
}
}
+#else
+ UNUSED(sco_inx);
#endif
+#else
+ UNUSED(sco_inx);
#endif
}
/*******************************************************************************
@@ -382,6 +387,8 @@ tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf)
return (status);
#else
+ UNUSED(sco_inx);
+ UNUSED(p_buf);
return (BTM_NO_RESOURCES);
#endif
}
diff --git a/stack/btm/btm_sec.c b/stack/btm/btm_sec.c
index e3628f8b8..09f41b799 100644
--- a/stack/btm/btm_sec.c
+++ b/stack/btm/btm_sec.c
@@ -28,6 +28,7 @@
#include "btu.h"
#include "btm_int.h"
#include "l2c_int.h"
+#include "bt_utils.h"
#if (BT_USE_TRACES == TRUE && BT_TRACE_VERBOSE == FALSE)
/* needed for sprintf() */
@@ -432,6 +433,13 @@ BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 serv
return(btm_sec_set_security_level (conn_type, p_name, service_id,
sec_level, psm, mx_proto_id, mx_chan_id));
#else
+ UNUSED(is_originator);
+ UNUSED(p_name);
+ UNUSED(service_id);
+ UNUSED(sec_level);
+ UNUSED(psm);
+ UNUSED(mx_proto_id);
+ UNUSED(mx_chan_id);
return FALSE;
#endif
}
@@ -842,6 +850,7 @@ UINT8 BTM_SecClrUCDService (UINT8 service_id)
return(num_cleared);
#else
+ UNUSED(service_id);
return(0);
#endif
}
@@ -4039,6 +4048,7 @@ BOOLEAN btm_sec_create_conn (BD_ADDR bda, UINT16 packet_types,
static void btm_sec_connect_after_reject_timeout (TIMER_LIST_ENT *p_tle)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_cb.p_collided_dev_rec;
+ UNUSED(p_tle);
BTM_TRACE_EVENT0 ("btm_sec_connect_after_reject_timeout()");
btm_cb.sec_collision_tle.param = 0;
@@ -4655,6 +4665,7 @@ static void btm_sec_pairing_timeout (TIMER_LIST_ENT *p_tle)
#endif
#endif
UINT8 name[2];
+ UNUSED(p_tle);
p_cb->pairing_tle.param = 0;
/* Coverity: FALSE-POSITIVE error from Coverity tool. Please do NOT remove following comment. */
@@ -5357,6 +5368,7 @@ static tBTM_SEC_SERV_REC *btm_sec_find_mx_serv (UINT8 is_originator, UINT16 psm,
static void btm_sec_collision_timeout (TIMER_LIST_ENT *p_tle)
{
tBTM_STATUS status;
+ UNUSED(p_tle);
BTM_TRACE_EVENT0 ("btm_sec_collision_timeout()");
btm_cb.sec_collision_tle.param = 0;
diff --git a/stack/btu/btu_task.c b/stack/btu/btu_task.c
index da9a54d28..9c0921413 100644
--- a/stack/btu/btu_task.c
+++ b/stack/btu/btu_task.c
@@ -166,6 +166,7 @@ BTU_API UINT32 btu_task (UINT32 param)
UINT8 i;
UINT16 mask;
BOOLEAN handled;
+ UNUSED(param);
#if (defined(HCISU_H4_INCLUDED) && HCISU_H4_INCLUDED == TRUE)
/* wait an event that HCISU is ready */
diff --git a/stack/gap/gap_api.c b/stack/gap/gap_api.c
index d17895d3a..fb90d038c 100644
--- a/stack/gap/gap_api.c
+++ b/stack/gap/gap_api.c
@@ -19,6 +19,7 @@
#include <string.h>
#include "bt_target.h"
+#include "bt_utils.h"
#include "gap_int.h"
#include "btm_int.h"
#include "gki.h"
@@ -683,6 +684,10 @@ UINT16 GAP_GetNextInquiryResult(tGAP_INQ_RESULTS *p_results)
UINT16 GAP_ReadLocalDeviceInfo(UINT8 *name, BD_ADDR *addr, tGAP_LMP_VERSION *verinfo,
tGAP_LMP_FEATURES *features)
{
+ UNUSED(name);
+ UNUSED(addr);
+ UNUSED(verinfo);
+ UNUSED(features);
return (GAP_UNSUPPORTED);
}
diff --git a/stack/gap/gap_ble.c b/stack/gap/gap_ble.c
index 48f4723e1..d44577dc0 100644
--- a/stack/gap/gap_ble.c
+++ b/stack/gap/gap_ble.c
@@ -19,6 +19,7 @@
#if (defined BLE_INCLUDED && BLE_INCLUDED == TRUE)
+#include "bt_utils.h"
#include <string.h>
#include "gap_int.h"
#include "gap_api.h"
@@ -345,6 +346,7 @@ tGATT_STATUS gap_read_attr_value (UINT16 handle, tGATT_VALUE *p_value, BOOLEAN i
tGATT_STATUS gap_proc_read (tGATTS_REQ_TYPE type, tGATT_READ_REQ *p_data, tGATTS_RSP *p_rsp)
{
tGATT_STATUS status = GATT_NO_RESOURCES;
+ UNUSED(type);
if (p_data->is_long)
p_rsp->attr_value.offset = p_data->offset;
@@ -381,6 +383,7 @@ UINT8 gap_proc_write_req( tGATTS_REQ_TYPE type, tGATT_WRITE_REQ *p_data)
{
tGAP_ATTR *p_db_attr = gap_cb.gatt_attr;
UINT8 i;
+ UNUSED(type);
for (i = 0; i < GAP_MAX_CHAR_NUM; i ++, p_db_attr ++)
{
@@ -613,6 +616,7 @@ static void gap_ble_c_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_
{
tGAP_CLCB *p_clcb = gap_find_clcb_by_bd_addr (bda);
UINT16 cl_op_uuid;
+ UNUSED(gatt_if);
GAP_TRACE_EVENT5 ("gap_ble_c_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
(bda[0]<<24)+(bda[1]<<16)+(bda[2]<<8)+bda[3],
diff --git a/stack/gap/gap_conn.c b/stack/gap/gap_conn.c
index 43765b767..44bb5ece8 100644
--- a/stack/gap/gap_conn.c
+++ b/stack/gap/gap_conn.c
@@ -18,6 +18,7 @@
#include "bt_target.h"
+#include "bt_utils.h"
#include "btu.h"
#include "gap_int.h"
#include "l2cdefs.h"
@@ -801,6 +802,7 @@ static void gap_checks_con_flags (tGAP_CCB *p_ccb)
static void gap_sec_check_complete (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
{
tGAP_CCB *p_ccb = (tGAP_CCB *)p_ref_data;
+ UNUSED(bd_addr);
GAP_TRACE_EVENT3 ("gap_sec_check_complete conn_state:%d, conn_flags:0x%x, status:%d",
p_ccb->con_state, p_ccb->con_flags, res);
diff --git a/stack/gap/gap_utils.c b/stack/gap/gap_utils.c
index d253a9937..866ad7ab6 100644
--- a/stack/gap/gap_utils.c
+++ b/stack/gap/gap_utils.c
@@ -18,6 +18,7 @@
#include <string.h>
#include "bt_target.h"
+#include "bt_utils.h"
#include "gap_int.h"
/*****************************************************************************/
@@ -116,6 +117,7 @@ void gap_inq_results_cb(tBTM_INQ_RESULTS *p_results, UINT8 *p_eir)
{
tGAP_INFO *p_cb;
UINT8 index;
+ UNUSED(p_eir);
GAP_TRACE_EVENT6 ("GAP Inquiry Results Callback (bdaddr [%02x%02x%02x%02x%02x%02x])",
p_results->remote_bd_addr[0], p_results->remote_bd_addr[1],
@@ -305,6 +307,8 @@ UINT16 gap_find_local_addr_by_name (const tBTM_BD_NAME devname, BD_ADDR bd_addr)
return (GAP_EOINQDB);
#else
+ UNUSED(devname);
+ UNUSED(bd_addr);
/* No data available because we are not automatically saving the data */
return (GAP_NO_DATA_AVAIL);
#endif
diff --git a/stack/gatt/gatt_attr.c b/stack/gatt/gatt_attr.c
index 9af6a609b..1ee4ae3a6 100644
--- a/stack/gatt/gatt_attr.c
+++ b/stack/gatt/gatt_attr.c
@@ -24,6 +24,7 @@
******************************************************************************/
#include "bt_target.h"
+#include "bt_utils.h"
#include "gatt_api.h"
#include "gatt_int.h"
@@ -216,6 +217,8 @@ static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_
static void gatt_profile_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id,
BOOLEAN connected, tGATT_DISCONN_REASON reason)
{
+ UNUSED(gatt_if);
+
GATT_TRACE_EVENT5 ("gatt_profile_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
(bda[0]<<24)+(bda[1]<<16)+(bda[2]<<8)+bda[3],
(bda[4]<<8)+bda[5], connected, conn_id, reason);
diff --git a/stack/gatt/gatt_auth.c b/stack/gatt/gatt_auth.c
index e945c909e..7dc99e195 100644
--- a/stack/gatt/gatt_auth.c
+++ b/stack/gatt/gatt_auth.c
@@ -22,6 +22,7 @@
*
******************************************************************************/
#include "bt_target.h"
+#include "bt_utils.h"
#if BLE_INCLUDED == TRUE
#include <string.h>
@@ -163,6 +164,7 @@ void gatt_enc_cmpl_cback(BD_ADDR bd_addr, void *p_ref_data, tBTM_STATUS result)
BOOLEAN status = FALSE;
tGATT_PENDING_ENC_CLCB *p_buf;
UINT16 count;
+ UNUSED(p_ref_data);
GATT_TRACE_DEBUG0("gatt_enc_cmpl_cback");
if ((p_tcb = gatt_find_tcb_by_addr(bd_addr)) != NULL)
diff --git a/stack/gatt/gatt_main.c b/stack/gatt/gatt_main.c
index 50522acde..d5e017b55 100644
--- a/stack/gatt/gatt_main.c
+++ b/stack/gatt/gatt_main.c
@@ -31,6 +31,7 @@
#include "l2c_api.h"
#include "btm_int.h"
#include "btm_ble_int.h"
+#include "bt_utils.h"
/* Configuration flags. */
#define GATT_L2C_CFG_IND_DONE (1<<0)
@@ -508,6 +509,7 @@ static void gatt_l2cif_connect_ind_cback (BD_ADDR bd_addr, UINT16 lcid, UINT16
UINT8 result = L2CAP_CONN_OK;
tL2CAP_CFG_INFO cfg;
tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr);
+ UNUSED(psm);
GATT_TRACE_ERROR1("Connection indication cid = %d", lcid);
/* new connection ? */
@@ -767,6 +769,7 @@ void gatt_l2cif_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
{
tGATT_TCB *p_tcb;
UINT16 reason;
+ UNUSED(result);
/* look up clcb for this channel */
if ((p_tcb = gatt_find_tcb_by_cid(lcid)) != NULL)
diff --git a/stack/gatt/gatt_sr.c b/stack/gatt/gatt_sr.c
index 68172839c..88040fe45 100644
--- a/stack/gatt/gatt_sr.c
+++ b/stack/gatt/gatt_sr.c
@@ -23,6 +23,7 @@
******************************************************************************/
#include "bt_target.h"
+#include "bt_utils.h"
#if BLE_INCLUDED == TRUE
#include <string.h>
@@ -262,6 +263,7 @@ tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
tGATT_STATUS status, tGATTS_RSP *p_msg)
{
tGATT_STATUS ret_code = GATT_SUCCESS;
+ UNUSED(trans_id);
GATT_TRACE_DEBUG1("gatt_sr_process_app_rsp gatt_if=%d", gatt_if);
@@ -326,7 +328,7 @@ tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
** Returns void
**
*******************************************************************************/
-void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, UINT8 *p_data)
+static void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT8 *p_data)
{
UINT8 *p = p_data, flag, i = 0;
UINT32 trans_id = 0;
@@ -525,7 +527,7 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
*******************************************************************************/
static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_tcb,
UINT8 op_code, UINT16 s_hdl,
- UINT16 e_hdl, UINT8 *p_data, tBT_UUID value)
+ UINT16 e_hdl, tBT_UUID value)
{
tGATT_STATUS status = GATT_NOT_FOUND;
UINT8 handle_len =4, *p ;
@@ -784,7 +786,7 @@ void gatts_process_primary_service_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 l
else
{
memset(p_msg, 0, msg_len);
- reason = gatt_build_primary_service_rsp (p_msg, p_tcb, op_code, s_hdl, e_hdl, p_data, value);
+ reason = gatt_build_primary_service_rsp (p_msg, p_tcb, op_code, s_hdl, e_hdl, value);
}
}
}
@@ -1169,7 +1171,7 @@ void gatts_process_write_req (tGATT_TCB *p_tcb, UINT8 i_rcb, UINT16 handle,
**
*******************************************************************************/
static void gatts_process_read_req(tGATT_TCB *p_tcb, tGATT_SR_REG *p_rcb, UINT8 op_code,
- UINT16 handle, UINT16 len, UINT8 *p_data)
+ UINT16 handle, UINT8 *p_data)
{
UINT16 buf_len = (UINT16)(sizeof(BT_HDR) + p_tcb->payload_size + L2CAP_MIN_OFFSET);
tGATT_STATUS reason;
@@ -1285,7 +1287,7 @@ void gatts_process_attribute_req (tGATT_TCB *p_tcb, UINT8 op_code,
{
case GATT_REQ_READ: /* read char/char descriptor value */
case GATT_REQ_READ_BLOB:
- gatts_process_read_req(p_tcb, p_rcb, op_code, handle, len, p);
+ gatts_process_read_req(p_tcb, p_rcb, op_code, handle, p);
break;
case GATT_REQ_WRITE: /* write char/char descriptor value */
@@ -1502,7 +1504,7 @@ void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
break;
case GATT_REQ_EXEC_WRITE:
- gatt_process_exec_write_req (p_tcb, op_code, len, p_data);
+ gatt_process_exec_write_req (p_tcb, op_code, p_data);
break;
case GATT_REQ_READ_MULTI:
diff --git a/stack/gatt/gatt_utils.c b/stack/gatt/gatt_utils.c
index e15918c55..7ce77eb56 100644
--- a/stack/gatt/gatt_utils.c
+++ b/stack/gatt/gatt_utils.c
@@ -22,6 +22,7 @@
*
******************************************************************************/
#include "bt_target.h"
+#include "bt_utils.h"
#if BLE_INCLUDED == TRUE
#include <string.h>
@@ -477,6 +478,8 @@ void gatt_update_last_pri_srv_info(tGATT_SRV_LIST_INFO *p_list)
*******************************************************************************/
void gatts_update_srv_list_elem(UINT8 i_sreg, UINT16 handle, BOOLEAN is_primary)
{
+ UNUSED(handle);
+
gatt_cb.srv_list[i_sreg].in_use = TRUE;
gatt_cb.srv_list[i_sreg].i_sreg = i_sreg;
gatt_cb.srv_list[i_sreg].s_hdl = gatt_cb.sr_reg[i_sreg].s_hdl;
@@ -1299,6 +1302,7 @@ UINT8 gatt_sr_alloc_rcb(tGATT_HDL_LIST_ELEM *p_list )
void gatt_sr_get_sec_info(BD_ADDR rem_bda, BOOLEAN le_conn, UINT8 *p_sec_flag, UINT8 *p_key_size)
{
UINT8 sec_flag = 0;
+ UNUSED(le_conn);
BTM_GetSecurityFlags(rem_bda, &sec_flag);
diff --git a/stack/hid/hidh_conn.c b/stack/hid/hidh_conn.c
index d9345a05e..86b41d36f 100644
--- a/stack/hid/hidh_conn.c
+++ b/stack/hid/hidh_conn.c
@@ -41,6 +41,7 @@
#include "hidh_api.h"
#include "hidh_int.h"
+#include "bt_utils.h"
static UINT8 find_conn_by_cid (UINT16 cid);
static void hidh_conn_retry (UINT8 dhandle);
@@ -163,6 +164,7 @@ tHID_STATUS hidh_conn_disconnect (UINT8 dhandle)
void hidh_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
{
tHID_HOST_DEV_CTB *p_dev= (tHID_HOST_DEV_CTB *) p_ref_data;
+ UNUSED(bd_addr);
if( res == BTM_SUCCESS && p_dev->conn.conn_state == HID_CONN_STATE_SECURITY )
{
@@ -320,6 +322,7 @@ void hidh_sec_check_complete_orig (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
UINT32 cb_res = HID_ERR_AUTH_FAILED;
#endif
UINT32 reason;
+ UNUSED(bd_addr);
dhandle = ((UINT32)p_dev - (UINT32)&(hh_cb.devices[0]))/ sizeof(tHID_HOST_DEV_CTB);
if( res == BTM_SUCCESS && p_dev->conn.conn_state == HID_CONN_STATE_SECURITY )
@@ -654,6 +657,7 @@ static void hidh_l2cif_disconnect_cfm (UINT16 l2cap_cid, UINT16 result)
{
UINT8 dhandle;
tHID_CONN *p_hcon = NULL;
+ UNUSED(result);
/* Find CCB based on CID */
if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES )
diff --git a/stack/l2cap/l2c_ble.c b/stack/l2cap/l2c_ble.c
index a44049282..2f2646e4c 100644
--- a/stack/l2cap/l2c_ble.c
+++ b/stack/l2cap/l2c_ble.c
@@ -24,6 +24,7 @@
#include <string.h>
#include "bt_target.h"
+#include "bt_utils.h"
#include "l2cdefs.h"
#include "l2c_int.h"
#include "btu.h"
@@ -426,6 +427,10 @@ void l2cble_advertiser_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE typ
{
tL2C_LCB *p_lcb;
tBTM_SEC_DEV_REC *p_dev_rec;
+ UNUSED(type);
+ UNUSED(conn_interval);
+ UNUSED(conn_latency);
+ UNUSED(conn_timeout);
/* See if we have a link control block for the remote device */
p_lcb = l2cu_find_lcb_by_bd_addr (bda);
diff --git a/stack/l2cap/l2c_link.c b/stack/l2cap/l2c_link.c
index ca563d9b3..fd38ca243 100644
--- a/stack/l2cap/l2c_link.c
+++ b/stack/l2cap/l2c_link.c
@@ -30,6 +30,7 @@
#include "gki.h"
#include "bt_types.h"
+#include "bt_utils.h"
#include "hcimsgs.h"
#include "l2cdefs.h"
#include "l2c_int.h"
@@ -949,7 +950,9 @@ UINT8 l2c_link_pkts_rcvd (UINT16 *num_pkts, UINT16 *handles)
num_found++;
}
}
-
+#else
+ UNUSED(num_pkts);
+ UNUSED(handles);
#endif
return (num_found);
diff --git a/stack/mcap/mca_cact.c b/stack/mcap/mca_cact.c
index 85f19f46a..16a8cecdb 100644
--- a/stack/mcap/mca_cact.c
+++ b/stack/mcap/mca_cact.c
@@ -24,6 +24,7 @@
******************************************************************************/
#include <string.h>
#include "bt_target.h"
+#include "bt_utils.h"
#include "gki.h"
#include "btm_api.h"
#include "mca_api.h"
@@ -47,6 +48,8 @@
void mca_ccb_rsp_tout(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
tMCA_CTRL evt_data;
+ UNUSED(p_data);
+
mca_ccb_report_event(p_ccb, MCA_RSP_TOUT_IND_EVT, &evt_data);
}
@@ -76,6 +79,8 @@ void mca_ccb_report_event(tMCA_CCB *p_ccb, UINT8 event, tMCA_CTRL *p_data)
*******************************************************************************/
void mca_ccb_free_msg(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
+ UNUSED(p_ccb);
+
GKI_freebuf (p_data);
}
@@ -210,6 +215,8 @@ void mca_ccb_snd_rsp(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
*******************************************************************************/
void mca_ccb_do_disconn (tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
+ UNUSED(p_data);
+
mca_dcb_close_by_mdl_id (p_ccb, MCA_ALL_MDL_ID);
L2CA_DisconnectReq(p_ccb->lcid);
}
@@ -573,6 +580,8 @@ void mca_ccb_ll_open (tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
*******************************************************************************/
void mca_ccb_dl_open (tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
{
+ UNUSED(p_data);
+
mca_free_buf ((void **)&p_ccb->p_tx_req);
mca_free_buf ((void **)&p_ccb->p_rx_msg);
p_ccb->status = MCA_CCB_STAT_NORM;
diff --git a/stack/mcap/mca_dact.c b/stack/mcap/mca_dact.c
index 353153eb8..d147c3906 100644
--- a/stack/mcap/mca_dact.c
+++ b/stack/mcap/mca_dact.c
@@ -23,6 +23,7 @@
*
******************************************************************************/
#include "bt_target.h"
+#include "bt_utils.h"
#include "gki.h"
#include "mca_api.h"
#include "mca_int.h"
@@ -99,6 +100,8 @@ void mca_dcb_cong (tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
*******************************************************************************/
void mca_dcb_free_data (tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
{
+ UNUSED(p_dcb);
+
GKI_freebuf (p_data);
}
@@ -114,6 +117,8 @@ void mca_dcb_free_data (tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
void mca_dcb_do_disconn (tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
{
tMCA_CLOSE close;
+ UNUSED(p_data);
+
if ((p_dcb->lcid == 0) || (L2CA_DisconnectReq(p_dcb->lcid) == FALSE))
{
close.param = MCA_INT;
diff --git a/stack/mcap/mca_l2c.c b/stack/mcap/mca_l2c.c
index 23d56f5d6..bc6fe09dd 100644
--- a/stack/mcap/mca_l2c.c
+++ b/stack/mcap/mca_l2c.c
@@ -24,6 +24,7 @@
#include <string.h>
#include "bt_target.h"
+#include "bt_utils.h"
#include "btm_api.h"
#include "btm_int.h"
#include "mca_api.h"
@@ -118,6 +119,7 @@ static void mca_sec_check_complete_orig (BD_ADDR bd_addr, void *p_ref_data, UINT
{
tMCA_TC_TBL *p_tbl = (tMCA_TC_TBL *)p_ref_data;
tL2CAP_CFG_INFO cfg;
+ UNUSED(bd_addr);
MCA_TRACE_DEBUG1("mca_sec_check_complete_orig res: %d", res);
diff --git a/stack/pan/pan_main.c b/stack/pan/pan_main.c
index 6cbe1ce8d..bfaced65c 100644
--- a/stack/pan/pan_main.c
+++ b/stack/pan/pan_main.c
@@ -26,6 +26,7 @@
#include <string.h>
#include "gki.h"
#include "bt_types.h"
+#include "bt_utils.h"
#include "bnep_api.h"
#include "pan_api.h"
#include "pan_int.h"
@@ -333,6 +334,7 @@ void pan_connect_state_cb (UINT16 handle, BD_ADDR rem_bda, tBNEP_RESULT result,
{
tPAN_CONN *pcb;
UINT8 peer_role;
+ UNUSED(rem_bda);
PAN_TRACE_EVENT2 ("pan_connect_state_cb - for handle %d, result %d", handle, result);
pcb = pan_get_pcb_by_handle (handle);
diff --git a/stack/rfcomm/port_rfc.c b/stack/rfcomm/port_rfc.c
index 3f697e14e..003cbb55d 100644
--- a/stack/rfcomm/port_rfc.c
+++ b/stack/rfcomm/port_rfc.c
@@ -32,6 +32,7 @@
#include "btm_api.h"
#include "port_int.h"
#include "rfc_int.h"
+#include "bt_utils.h"
/*
** Local function definitions
@@ -581,6 +582,7 @@ void PORT_PortNegInd (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars,
void PORT_PortNegCnf (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars, UINT16 result)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
+ UNUSED(p_pars);
RFCOMM_TRACE_EVENT0 ("PORT_PortNegCnf");
@@ -682,6 +684,7 @@ void PORT_ControlCnf (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_CTRL *p_pars)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
UINT32 event = 0;
+ UNUSED(p_pars);
RFCOMM_TRACE_EVENT0 ("PORT_ControlCnf");
diff --git a/stack/rfcomm/rfc_l2cap_if.c b/stack/rfcomm/rfc_l2cap_if.c
index cb50612fc..9137a6638 100644
--- a/stack/rfcomm/rfc_l2cap_if.c
+++ b/stack/rfcomm/rfc_l2cap_if.c
@@ -31,6 +31,7 @@
#include "l2c_api.h"
#include "l2cdefs.h"
#include "rfc_int.h"
+#include "bt_utils.h"
/*
@@ -87,6 +88,7 @@ void rfcomm_l2cap_if_init (void)
void RFCOMM_ConnectInd (BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
{
tRFC_MCB *p_mcb = rfc_alloc_multiplexer_channel(bd_addr, FALSE);
+ UNUSED(psm);
if ((p_mcb)&&(p_mcb->state != RFC_MX_STATE_IDLE))
{
@@ -257,6 +259,7 @@ void RFCOMM_ConfigCnf (UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
*******************************************************************************/
void RFCOMM_QoSViolationInd (BD_ADDR bd_addr)
{
+ UNUSED(bd_addr);
}
diff --git a/stack/rfcomm/rfc_mx_fsm.c b/stack/rfcomm/rfc_mx_fsm.c
index d6bc5068d..6d8bb0650 100644
--- a/stack/rfcomm/rfc_mx_fsm.c
+++ b/stack/rfcomm/rfc_mx_fsm.c
@@ -31,6 +31,7 @@
#include "port_int.h"
#include "l2c_api.h"
#include "rfc_int.h"
+#include "bt_utils.h"
#define L2CAP_SUCCESS 0
#define L2CAP_ERROR 1
@@ -308,6 +309,8 @@ void rfc_mx_sm_state_configure (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
*******************************************************************************/
void rfc_mx_sm_sabme_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
{
+ UNUSED(p_data);
+
RFCOMM_TRACE_EVENT1 ("rfc_mx_sm_sabme_wait_ua - evt:%d", event);
switch (event)
{
@@ -436,6 +439,8 @@ void rfc_mx_sm_state_wait_sabme (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
*******************************************************************************/
void rfc_mx_sm_state_connected (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
{
+ UNUSED(p_data);
+
RFCOMM_TRACE_EVENT1 ("rfc_mx_sm_state_connected - evt:%d", event);
switch (event)
diff --git a/stack/rfcomm/rfc_port_fsm.c b/stack/rfcomm/rfc_port_fsm.c
index d5335ad59..e519a982f 100644
--- a/stack/rfcomm/rfc_port_fsm.c
+++ b/stack/rfcomm/rfc_port_fsm.c
@@ -31,6 +31,7 @@
#include "port_api.h"
#include "port_int.h"
#include "rfc_int.h"
+#include "bt_utils.h"
/********************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
@@ -795,6 +796,8 @@ void rfc_process_rls (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
*******************************************************************************/
void rfc_process_nsc (tRFC_MCB *p_mcb, MX_FRAME *p_frame)
{
+ UNUSED(p_mcb);
+ UNUSED(p_frame);
}
@@ -808,6 +811,8 @@ void rfc_process_nsc (tRFC_MCB *p_mcb, MX_FRAME *p_frame)
*******************************************************************************/
void rfc_process_test_rsp (tRFC_MCB *p_mcb, BT_HDR *p_buf)
{
+ UNUSED(p_mcb);
+
GKI_freebuf (p_buf);
}
diff --git a/stack/rfcomm/rfc_port_if.c b/stack/rfcomm/rfc_port_if.c
index 083d9ef95..741df201e 100644
--- a/stack/rfcomm/rfc_port_if.c
+++ b/stack/rfcomm/rfc_port_if.c
@@ -31,7 +31,7 @@
#include "l2c_api.h"
#include "port_int.h"
#include "rfc_int.h"
-
+#include "bt_utils.h"
#if RFC_DYNAMIC_MEMORY == FALSE
tRFC_CB rfc_cb;
@@ -82,6 +82,7 @@ void RFCOMM_StartRsp (tRFC_MCB *p_mcb, UINT16 result)
void RFCOMM_DlcEstablishReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
+ UNUSED(mtu);
if (p_mcb->state != RFC_MX_STATE_CONNECTED)
{
@@ -104,6 +105,7 @@ void RFCOMM_DlcEstablishReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
void RFCOMM_DlcEstablishRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 result)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
+ UNUSED(mtu);
if ((p_mcb->state != RFC_MX_STATE_CONNECTED) && (result == RFCOMM_SUCCESS))
{
diff --git a/stack/rfcomm/rfc_utils.c b/stack/rfcomm/rfc_utils.c
index 2b850fa68..d2b02fc39 100644
--- a/stack/rfcomm/rfc_utils.c
+++ b/stack/rfcomm/rfc_utils.c
@@ -33,6 +33,7 @@
#include "port_int.h"
#include "rfc_int.h"
#include "btu.h"
+#include "bt_utils.h"
#include <string.h>
@@ -352,6 +353,7 @@ void rfcomm_process_timeout (TIMER_LIST_ENT *p_tle)
void rfc_sec_check_complete (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
{
tPORT *p_port = (tPORT *)p_ref_data;
+ UNUSED(bd_addr);
/* Verify that PORT is still waiting for Security to complete */
if (!p_port->in_use
diff --git a/stack/sdp/sdp_api.c b/stack/sdp/sdp_api.c
index 7af690b79..147166474 100644
--- a/stack/sdp/sdp_api.c
+++ b/stack/sdp/sdp_api.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include "bt_target.h"
+#include "bt_utils.h"
#include "gki.h"
#include "l2cdefs.h"
#include "hcidefs.h"
@@ -244,6 +245,8 @@ BOOLEAN SDP_ServiceSearchAttributeRequest2 (UINT8 *p_bd_addr, tSDP_DISCOVERY_DB
#if SDP_CLIENT_ENABLED == TRUE
void SDP_SetIdleTimeout (BD_ADDR addr, UINT16 timeout)
{
+ UNUSED(addr);
+ UNUSED(timeout);
}
#endif
diff --git a/stack/sdp/sdp_main.c b/stack/sdp/sdp_main.c
index 14cd39b6f..d43c634b0 100644
--- a/stack/sdp/sdp_main.c
+++ b/stack/sdp/sdp_main.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include "bt_target.h"
+#include "bt_utils.h"
#include "gki.h"
#include "l2cdefs.h"
#include "hcidefs.h"
@@ -170,6 +171,7 @@ UINT16 sdp_set_max_attr_list_size (UINT16 max_size)
*******************************************************************************/
static void sdp_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UINT8 l2cap_id)
{
+ UNUSED(psm);
#if SDP_SERVER_ENABLED == TRUE
tCONN_CB *p_ccb;
@@ -671,6 +673,7 @@ void sdp_disconnect (tCONN_CB*p_ccb, UINT16 reason)
static void sdp_disconnect_cfm (UINT16 l2cap_cid, UINT16 result)
{
tCONN_CB *p_ccb;
+ UNUSED(result);
/* Find CCB based on CID */
if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
diff --git a/stack/sdp/sdp_server.c b/stack/sdp/sdp_server.c
index 342d93e7a..5d11cb40e 100644
--- a/stack/sdp/sdp_server.c
+++ b/stack/sdp/sdp_server.c
@@ -29,6 +29,7 @@
#include "gki.h"
#include "bt_types.h"
+#include "bt_utils.h"
#include "btu.h"
#include "l2cdefs.h"
@@ -177,6 +178,7 @@ static void process_service_search (tCONN_CB *p_ccb, UINT16 trans_num,
tSDP_RECORD *p_rec = NULL;
BT_HDR *p_buf;
BOOLEAN is_cont = FALSE;
+ UNUSED(p_req_end);
p_req = sdpu_extract_uid_seq (p_req, param_len, &uid_seq);
@@ -565,6 +567,7 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
BOOLEAN maxxed_out = FALSE, is_cont = FALSE;
UINT8 *p_seq_start;
UINT16 seq_len, attr_len;
+ UNUSED(p_req_end);
/* Extract the UUID sequence to search for */
p_req = sdpu_extract_uid_seq (p_req, param_len, &uid_seq);
diff --git a/stack/smp/smp_act.c b/stack/smp/smp_act.c
index babd300b8..3370a2ccb 100644
--- a/stack/smp/smp_act.c
+++ b/stack/smp/smp_act.c
@@ -17,6 +17,7 @@
******************************************************************************/
#include "bt_target.h"
+#include "bt_utils.h"
#if SMP_INCLUDED == TRUE
@@ -83,6 +84,8 @@ void smp_send_app_cback(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tSMP_EVT_DATA cb_data;
tSMP_STATUS callback_rc;
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG1 ("smp_send_app_cback p_cb->cb_evt=%d", p_cb->cb_evt );
if (p_cb->p_callback && p_cb->cb_evt != 0)
{
@@ -147,6 +150,8 @@ void smp_send_pair_fail(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
void smp_send_pair_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (p_cb->pairing_bda);
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_send_pair_req ");
#if BLE_INCLUDED == TRUE
@@ -170,6 +175,8 @@ void smp_send_pair_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_send_pair_rsp(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_send_pair_rsp ");
p_cb->loc_i_key &= p_cb->peer_i_key;
@@ -187,6 +194,8 @@ void smp_send_pair_rsp(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_send_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_send_confirm ");
smp_send_cmd(SMP_OPCODE_CONFIRM, p_cb);
}
@@ -196,6 +205,8 @@ void smp_send_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_send_init(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_send_init ");
#if SMP_CONFORMANCE_TESTING == TRUE
@@ -215,6 +226,7 @@ void smp_send_init(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
void smp_send_enc_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tBTM_LE_LENC_KEYS le_key;
+ UNUSED(p_data);
SMP_TRACE_DEBUG1 ("smp_send_enc_info p_cb->loc_enc_size = %d", p_cb->loc_enc_size);
smp_update_key_mask (p_cb, SMP_SEC_KEY_TYPE_ENC, FALSE);
@@ -238,6 +250,8 @@ void smp_send_enc_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_send_id_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_send_id_info ");
smp_update_key_mask (p_cb, SMP_SEC_KEY_TYPE_ID, FALSE);
@@ -255,6 +269,8 @@ void smp_send_id_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
void smp_send_csrk_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
tBTM_LE_KEY_VALUE key;
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_send_csrk_info ");
smp_update_key_mask (p_cb, SMP_SEC_KEY_TYPE_CSRK, FALSE);
@@ -614,6 +630,8 @@ void smp_start_enc(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_proc_discard(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_proc_discard ");
smp_reset_control_value(p_cb);
}
@@ -623,6 +641,8 @@ void smp_proc_discard(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_proc_release_delay(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_proc_release_delay ");
btu_stop_timer (&p_cb->rsp_timer_ent);
btu_start_timer (&p_cb->rsp_timer_ent, BTU_TTYPE_SMP_PAIRING_CMD,
@@ -635,6 +655,8 @@ void smp_proc_release_delay(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_proc_release_delay_tout(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_proc_release_delay_tout ");
btu_stop_timer (&p_cb->rsp_timer_ent);
smp_proc_pairing_cmpl(p_cb);
@@ -750,6 +772,7 @@ void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
UINT8 int_evt = 0;
tSMP_KEY key;
tSMP_INT_DATA *p = NULL;
+ UNUSED(p_data);
SMP_TRACE_DEBUG3 ("smp_decide_asso_model p_cb->peer_io_caps = %d p_cb->loc_io_caps = %d \
p_cb->peer_auth_req = %02x",
@@ -847,6 +870,8 @@ void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_proc_io_rsp(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_proc_io_rsp ");
if (p_cb->flags & SMP_PAIR_FLAGS_WE_STARTED_DD)
{
@@ -887,9 +912,11 @@ void smp_pairing_cmpl(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_pair_terminate(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_pair_terminate ");
- p_cb->status = SMP_CONN_TOUT;
+ p_cb->status = SMP_CONN_TOUT;
smp_proc_pairing_cmpl(p_cb);
}
@@ -914,11 +941,12 @@ void smp_delay_terminate(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
/*******************************************************************************
** Function smp_idle_terminate
-** Description This function calledin idle state to determine to send authentication
+** Description This function called in idle state to determine to send authentication
** complete or not.
*******************************************************************************/
void smp_idle_terminate(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
if (p_cb->flags & SMP_PAIR_FLAGS_WE_STARTED_DD)
{
SMP_TRACE_DEBUG0("Pairing terminated at IDLE state.");
diff --git a/stack/smp/smp_api.c b/stack/smp/smp_api.c
index b80237697..64644da21 100644
--- a/stack/smp/smp_api.c
+++ b/stack/smp/smp_api.c
@@ -25,6 +25,7 @@
#include <string.h>
#include "bt_target.h"
+#include "bt_utils.h"
#if SMP_INCLUDED == TRUE
#include "smp_int.h"
#include "smp_api.h"
@@ -284,6 +285,7 @@ void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, UINT8 len, UINT8 *p_data
tSMP_CB *p_cb = & smp_cb;
UINT8 failure = SMP_OOB_FAIL;
tSMP_KEY key;
+ UNUSED(bd_addr);
SMP_TRACE_EVENT2 ("SMP_OobDataReply State: %d res:%d",
smp_cb.state, res);
diff --git a/stack/smp/smp_keys.c b/stack/smp/smp_keys.c
index a1955f202..49612a5da 100644
--- a/stack/smp/smp_keys.c
+++ b/stack/smp/smp_keys.c
@@ -24,6 +24,7 @@
******************************************************************************/
#include "bt_target.h"
+#include "bt_utils.h"
#if SMP_INCLUDED == TRUE
#if SMP_DEBUG == TRUE
@@ -161,6 +162,8 @@ BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
*******************************************************************************/
void smp_generate_passkey(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_generate_passkey");
p_cb->rand_enc_proc = SMP_GEN_TK;
@@ -226,6 +229,7 @@ void smp_generate_stk (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
UINT8 *p = ptext;
tSMP_ENC output;
tSMP_STATUS status = SMP_PAIR_FAIL_UNKNOWN;
+ UNUSED(p_data);
SMP_TRACE_DEBUG0 ("smp_generate_stk ");
@@ -266,6 +270,8 @@ void smp_generate_stk (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_generate_confirm (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_generate_confirm");
p_cb->rand_enc_proc = SMP_GEN_SRAND_MRAND;
/* generate MRand or SRand */
@@ -284,6 +290,8 @@ void smp_generate_confirm (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_genenrate_rand_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_genenrate_rand_cont ");
p_cb->rand_enc_proc = SMP_GEN_SRAND_MRAND_CONT;
/* generate 64 MSB of MRand or SRand */
@@ -305,6 +313,7 @@ void smp_genenrate_rand_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
void smp_generate_ltk(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
BOOLEAN div_status;
+ UNUSED(p_data);
SMP_TRACE_DEBUG0 ("smp_generate_ltk ");
@@ -343,6 +352,7 @@ void smp_compute_csrk(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
UINT8 *p=buffer;
tSMP_ENC output;
tSMP_STATUS status = SMP_PAIR_FAIL_UNKNOWN;
+ UNUSED(p_data);
SMP_TRACE_DEBUG1 ("smp_compute_csrk div=%x", p_cb->div);
BTM_GetDeviceEncRoot(er);
@@ -376,6 +386,7 @@ void smp_compute_csrk(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
void smp_generate_csrk(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
BOOLEAN div_status;
+ UNUSED(p_data);
SMP_TRACE_DEBUG0 ("smp_generate_csrk");
@@ -544,6 +555,7 @@ void smp_calculate_comfirm (tSMP_CB *p_cb, BT_OCTET16 rand, BD_ADDR bda)
BT_OCTET16 p1;
tSMP_ENC output;
tSMP_STATUS status = SMP_PAIR_FAIL_UNKNOWN;
+ UNUSED(bda);
SMP_TRACE_DEBUG0 ("smp_calculate_comfirm ");
/* generate p1 = pres || preq || rat' || iat' */
@@ -625,6 +637,8 @@ static void smp_calculate_comfirm_cont(tSMP_CB *p_cb, tSMP_ENC *p)
*******************************************************************************/
static void smp_genenrate_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_genenrate_confirm ");
p_cb->rand_enc_proc = SMP_GEN_CONFIRM;
@@ -645,6 +659,8 @@ static void smp_genenrate_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_generate_compare (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ UNUSED(p_data);
+
SMP_TRACE_DEBUG0 ("smp_generate_compare ");
p_cb->rand_enc_proc = SMP_GEN_COMPARE;
@@ -755,6 +771,7 @@ static void smp_genenrate_ltk_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
BT_OCTET16 er;
tSMP_ENC output;
tSMP_STATUS status = SMP_PAIR_FAIL_UNKNOWN;
+ UNUSED(p_data);
SMP_TRACE_DEBUG0 ("smp_genenrate_ltk_cont ");
BTM_GetDeviceEncRoot(er);
@@ -790,7 +807,7 @@ static void smp_generate_y(tSMP_CB *p_cb, tSMP_INT_DATA *p)
BT_OCTET16 dhk;
tSMP_ENC output;
tSMP_STATUS status = SMP_PAIR_FAIL_UNKNOWN;
-
+ UNUSED(p);
SMP_TRACE_DEBUG0 ("smp_generate_y ");
BTM_GetDeviceDHK(dhk);
@@ -818,6 +835,8 @@ static void smp_generate_y(tSMP_CB *p_cb, tSMP_INT_DATA *p)
*******************************************************************************/
static void smp_generate_rand_vector (tSMP_CB *p_cb, tSMP_INT_DATA *p)
{
+ UNUSED(p);
+
/* generate EDIV and rand now */
/* generate random vector */
SMP_TRACE_DEBUG0 ("smp_generate_rand_vector ");
diff --git a/stack/smp/smp_utils.c b/stack/smp/smp_utils.c
index 168d6bd11..dac0cc02e 100644
--- a/stack/smp/smp_utils.c
+++ b/stack/smp/smp_utils.c
@@ -26,6 +26,7 @@
#if SMP_INCLUDED == TRUE
#include "bt_types.h"
+#include "bt_utils.h"
#include <string.h>
#include <ctype.h>
#include "hcidefs.h"
@@ -151,6 +152,7 @@ void smp_rsp_timeout(TIMER_LIST_ENT *p_tle)
{
tSMP_CB *p_cb = &smp_cb;
UINT8 failure = SMP_RSP_TIMEOUT;
+ UNUSED(p_tle);
SMP_TRACE_EVENT1("smp_rsp_timeout state:%d", p_cb->state);
@@ -207,6 +209,8 @@ static BT_HDR * smp_build_confirm_cmd(UINT8 cmd_code, tSMP_CB *p_cb)
{
BT_HDR *p_buf = NULL ;
UINT8 *p;
+ UNUSED(cmd_code);
+
SMP_TRACE_EVENT0("smp_build_confirm_cmd");
if ((p_buf = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR) + SMP_CONFIRM_CMD_SIZE + L2CAP_MIN_OFFSET)) != NULL)
{
@@ -232,6 +236,8 @@ static BT_HDR * smp_build_rand_cmd(UINT8 cmd_code, tSMP_CB *p_cb)
{
BT_HDR *p_buf = NULL ;
UINT8 *p;
+ UNUSED(cmd_code);
+
SMP_TRACE_EVENT0("smp_build_rand_cmd");
if ((p_buf = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR) + SMP_INIT_CMD_SIZE + L2CAP_MIN_OFFSET)) != NULL)
{
@@ -257,6 +263,8 @@ static BT_HDR * smp_build_encrypt_info_cmd(UINT8 cmd_code, tSMP_CB *p_cb)
{
BT_HDR *p_buf = NULL ;
UINT8 *p;
+ UNUSED(cmd_code);
+
SMP_TRACE_EVENT0("smp_build_encrypt_info_cmd");
if ((p_buf = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR) + SMP_ENC_INFO_SIZE + L2CAP_MIN_OFFSET)) != NULL)
{
@@ -282,6 +290,8 @@ static BT_HDR * smp_build_master_id_cmd(UINT8 cmd_code, tSMP_CB *p_cb)
{
BT_HDR *p_buf = NULL ;
UINT8 *p;
+ UNUSED(cmd_code);
+
SMP_TRACE_EVENT0("smp_build_master_id_cmd ");
if ((p_buf = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR) + SMP_MASTER_ID_SIZE + L2CAP_MIN_OFFSET)) != NULL)
{
@@ -309,6 +319,9 @@ static BT_HDR * smp_build_identity_info_cmd(UINT8 cmd_code, tSMP_CB *p_cb)
BT_HDR *p_buf = NULL ;
UINT8 *p;
BT_OCTET16 irk;
+ UNUSED(cmd_code);
+ UNUSED(p_cb);
+
SMP_TRACE_EVENT0("smp_build_identity_info_cmd");
if ((p_buf = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR) + SMP_ID_INFO_SIZE + L2CAP_MIN_OFFSET)) != NULL)
{
@@ -337,7 +350,8 @@ static BT_HDR * smp_build_id_addr_cmd(UINT8 cmd_code, tSMP_CB *p_cb)
BT_HDR *p_buf = NULL ;
UINT8 *p;
BD_ADDR static_addr;
-
+ UNUSED(cmd_code);
+ UNUSED(p_cb);
SMP_TRACE_EVENT0("smp_build_id_addr_cmd");
if ((p_buf = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR) + SMP_ID_ADDR_SIZE + L2CAP_MIN_OFFSET)) != NULL)
@@ -367,6 +381,7 @@ static BT_HDR * smp_build_signing_info_cmd(UINT8 cmd_code, tSMP_CB *p_cb)
{
BT_HDR *p_buf = NULL ;
UINT8 *p;
+ UNUSED(cmd_code);
SMP_TRACE_EVENT0("smp_build_signing_info_cmd");
if ((p_buf = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR) + SMP_SIGN_INFO_SIZE + L2CAP_MIN_OFFSET)) != NULL)
@@ -393,6 +408,8 @@ static BT_HDR * smp_build_pairing_fail(UINT8 cmd_code, tSMP_CB *p_cb)
{
BT_HDR *p_buf = NULL ;
UINT8 *p;
+ UNUSED(cmd_code);
+
SMP_TRACE_EVENT0("smp_build_pairing_fail");
if ((p_buf = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR) + SMP_PAIR_FAIL_SIZE + L2CAP_MIN_OFFSET)) != NULL)
{
@@ -418,6 +435,8 @@ static BT_HDR * smp_build_security_request(UINT8 cmd_code, tSMP_CB *p_cb)
{
BT_HDR *p_buf = NULL ;
UINT8 *p;
+ UNUSED(cmd_code);
+
SMP_TRACE_EVENT0("smp_build_security_request");
if ((p_buf = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR) + 2 + L2CAP_MIN_OFFSET)) != NULL)
diff --git a/stack/srvc/srvc_battery.c b/stack/srvc/srvc_battery.c
index 22e538bff..0606fd2f8 100644
--- a/stack/srvc/srvc_battery.c
+++ b/stack/srvc/srvc_battery.c
@@ -17,7 +17,7 @@
******************************************************************************/
#include "bt_target.h"
-
+#include "bt_utils.h"
#include "gatt_api.h"
#include "gatt_int.h"
#include "srvc_eng_int.h"
@@ -115,10 +115,11 @@ UINT8 battery_s_read_attr_value (UINT8 clcb_idx, UINT16 handle, tGATT_VALUE *p_v
tBA_INST *p_inst = &battery_cb.battery_inst[0];
tGATT_STATUS st = GATT_NOT_FOUND;
UINT8 act = SRVC_ACT_RSP;
+ UNUSED(p_value);
- for (i = 0; i < BA_MAX_INT_NUM; i ++, p_inst ++)
- {
- /* read battery level */
+ for (i = 0; i < BA_MAX_INT_NUM; i ++, p_inst ++)
+ {
+ /* read battery level */
if (handle == p_inst->ba_level_hdl ||
handle == p_inst->clt_cfg_hdl ||
handle == p_inst->rpt_ref_hdl ||
@@ -164,6 +165,7 @@ UINT8 battery_s_read_attr_value (UINT8 clcb_idx, UINT16 handle, tGATT_VALUE *p_v
*******************************************************************************/
BOOLEAN battery_gatt_c_read_ba_req(UINT16 conn_id)
{
+ UNUSED(conn_id);
return TRUE;
}
@@ -179,6 +181,10 @@ BOOLEAN battery_gatt_c_read_ba_req(UINT16 conn_id)
void battery_c_cmpl_cback (tSRVC_CLCB *p_clcb, tGATTC_OPTYPE op,
tGATT_STATUS status, tGATT_CL_COMPLETE *p_data)
{
+ UNUSED(p_clcb);
+ UNUSED(op);
+ UNUSED(status);
+ UNUSED(p_data);
}
@@ -395,6 +401,7 @@ void Battery_Notify (UINT8 app_id, BD_ADDR remote_bda, UINT8 battery_level)
*******************************************************************************/
BOOLEAN Battery_ReadBatteryLevel(BD_ADDR peer_bda)
{
+ UNUSED(peer_bda);
/* to be implemented */
return TRUE;
}
diff --git a/stack/srvc/srvc_dis.c b/stack/srvc/srvc_dis.c
index fcface272..90b4acddc 100644
--- a/stack/srvc/srvc_dis.c
+++ b/stack/srvc/srvc_dis.c
@@ -17,7 +17,7 @@
******************************************************************************/
#include "bt_target.h"
-
+#include "bt_utils.h"
#include "gatt_api.h"
#include "gatt_int.h"
#include "srvc_eng_int.h"
@@ -76,6 +76,8 @@ BOOLEAN dis_valid_handle_range(UINT16 handle)
*******************************************************************************/
UINT8 dis_write_attr_value(tGATT_WRITE_REQ * p_data, tGATT_STATUS *p_status)
{
+ UNUSED(p_data);
+
*p_status = GATT_WRITE_NOT_PERMIT;
return SRVC_ACT_RSP;
}
@@ -90,6 +92,7 @@ UINT8 dis_read_attr_value (UINT8 clcb_idx, UINT16 handle, tGATT_VALUE *p_value,
UINT16 offset = p_value->offset;
UINT8 act = SRVC_ACT_RSP;
tGATT_STATUS st = GATT_NOT_FOUND;
+ UNUSED(clcb_idx);
for (i = 0; i < DIS_MAX_CHAR_NUM; i ++, p_db_attr ++)
{
diff --git a/stack/srvc/srvc_eng.c b/stack/srvc/srvc_eng.c
index d8db1b01c..459873881 100644
--- a/stack/srvc/srvc_eng.c
+++ b/stack/srvc/srvc_eng.c
@@ -17,7 +17,7 @@
******************************************************************************/
#include "bt_target.h"
-
+#include "bt_utils.h"
#include "gatt_api.h"
#include "gatt_int.h"
#include "srvc_eng_int.h"
@@ -230,6 +230,7 @@ UINT8 srvc_eng_process_read_req (UINT8 clcb_idx, tGATT_READ_REQ *p_data, tGATTS_
UINT8 srvc_eng_process_write_req (UINT8 clcb_idx, tGATT_WRITE_REQ *p_data, tGATTS_RSP *p_rsp, tGATT_STATUS *p_status)
{
UINT8 act = SRVC_ACT_RSP;
+ UNUSED(p_rsp);
if (dis_valid_handle_range(p_data->handle))
{
@@ -342,6 +343,8 @@ static void srvc_eng_c_cmpl_cback (UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATU
static void srvc_eng_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id,
BOOLEAN connected, tGATT_DISCONN_REASON reason)
{
+ UNUSED(gatt_if);
+
GATT_TRACE_EVENT5 ("srvc_eng_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
(bda[0]<<24)+(bda[1]<<16)+(bda[2]<<8)+bda[3],
(bda[4]<<8)+bda[5], connected, conn_id, reason);