diff options
author | Mike J. Chen <mjchen@google.com> | 2014-01-31 18:16:59 -0800 |
---|---|---|
committer | Mike J. Chen <mjchen@google.com> | 2014-02-11 09:48:38 -0800 |
commit | 5cd8bff2dd0337cb52bf48f312e3d2d55a8882fb (patch) | |
tree | e57ed7fa0f556b2f10f081f39354a903511ae5f5 /stack/avrc | |
parent | 60126e439e01a30d6121a55aaf6d3a5d6d400507 (diff) | |
download | android_system_bt-5cd8bff2dd0337cb52bf48f312e3d2d55a8882fb.tar.gz android_system_bt-5cd8bff2dd0337cb52bf48f312e3d2d55a8882fb.tar.bz2 android_system_bt-5cd8bff2dd0337cb52bf48f312e3d2d55a8882fb.zip |
Major warnings cleanup
Mostly fixing unused parameter warnings.
A few other warnings also fixed like possible use of
unitialized variables (no real issue found, just compiler couldn't
follow the path), signed vs unsigned warning.
Also fixed some typos, indent issues, removal of dead code, etc.
Change-Id: I95eb887aefc4d559d7921f71a0af5f3bfb01ac01
Signed-off-by: Mike J. Chen <mjchen@google.com>
Diffstat (limited to 'stack/avrc')
-rwxr-xr-x | stack/avrc/avrc_bld_tg.c | 14 | ||||
-rwxr-xr-x | stack/avrc/avrc_pars_ct.c | 9 |
2 files changed, 20 insertions, 3 deletions
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; } |