summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2017-12-20 09:12:33 -0800
committerMark Salyzyn <salyzyn@google.com>2017-12-20 09:12:33 -0800
commitfba3a7fa5f9ee55f09b437599079a5605440f9b7 (patch)
tree84212f6c2a9326c37aca91f922355f7bbd5dc56f
parentc8fdc0c1310af6aa6c2f3ffc081d81e90dcc3768 (diff)
downloadbt-fba3a7fa5f9ee55f09b437599079a5605440f9b7.tar.gz
build warnings
Solve a series of build warnings, the most notable being the annoying unused label error: which makes _real_ build errors harder to find. Test: build warnings gone. Change-Id: I447bd06dabdaf52b4742b06fb081368e0d86eae5
-rw-r--r--msm8996/libbt-vendor/src/hw_rome.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/msm8996/libbt-vendor/src/hw_rome.c b/msm8996/libbt-vendor/src/hw_rome.c
index 2b5cb37..cede337 100644
--- a/msm8996/libbt-vendor/src/hw_rome.c
+++ b/msm8996/libbt-vendor/src/hw_rome.c
@@ -135,7 +135,6 @@ int get_vs_hci_event(unsigned char *rsp)
int err = 0;
unsigned char paramlen = 0;
unsigned char EMBEDDED_MODE_CHECK = 0x02;
- FILE *btversionfile = 0;
unsigned int soc_id = 0;
unsigned int productid = 0;
unsigned short patchversion = 0;
@@ -321,7 +320,7 @@ failed:
int read_vs_hci_event(int fd, unsigned char* buf, int size)
{
int remain, r;
- int count = 0, i;
+ int count = 0;
if (size <= 0) {
ALOGE("Invalid size arguement!");
@@ -688,7 +687,7 @@ error:
static int rome_download_rampatch(int fd)
{
- int c, tmp, size, index, ret = -1;
+ int c, size, index, ret = -1;
ALOGI("%s: ", __FUNCTION__);
@@ -763,7 +762,6 @@ pdata_alloc_failed:
free(phdr_buffer);
phdr_alloc_failed:
fclose(file);
-error:
return ret;
}
@@ -799,7 +797,7 @@ error:
int rome_rampatch_reset(int fd)
{
- int size, err = 0, flags;
+ int size, err = 0;
unsigned char cmd[HCI_MAX_CMD_SIZE];
struct timespec tm = { 0, 100*1000*1000 }; /* 100 ms */
@@ -831,7 +829,7 @@ int rome_get_tlv_file(char *file_path)
{
FILE * pFile;
long fileSize;
- int readSize, err = 0, total_segment, remain_size, nvm_length, nvm_index, i;
+ int readSize, nvm_length, nvm_index, i;
unsigned short nvm_tag_len;
tlv_patch_info *ptlv_header;
tlv_nvm_hdr *nvm_ptr;
@@ -1103,7 +1101,7 @@ int rome_download_tlv_file(int fd)
goto default_download;
}
- strlcat(nvm_file_path_bid, board_id, sizeof(nvm_file_path_bid));
+ strlcat(nvm_file_path_bid, (const char*)board_id, sizeof(nvm_file_path_bid));
if((tlv_size = rome_get_tlv_file(nvm_file_path_bid)) < 0) {
ALOGI("%s: %s: file doesn't exist, falling back to default file", __FUNCTION__, nvm_file_path_bid);
@@ -1126,7 +1124,6 @@ error:
int rome_1_0_nvm_tag_dnld(int fd)
{
int i, size, err = 0;
- unsigned char cmd[HCI_MAX_CMD_SIZE];
unsigned char rsp[HCI_MAX_EVENT_SIZE];
#if (NVM_VERSION >= ROME_1_0_100019)
@@ -1583,7 +1580,6 @@ int rome_hci_reset(int fd)
unsigned char cmd[HCI_MAX_CMD_SIZE];
unsigned char rsp[HCI_MAX_EVENT_SIZE];
hci_command_hdr *cmd_hdr;
- int flags;
ALOGI("%s: HCI RESET ", __FUNCTION__);
@@ -1621,7 +1617,6 @@ int rome_wipower_current_charging_status_req(int fd)
unsigned char cmd[HCI_MAX_CMD_SIZE];
unsigned char rsp[HCI_MAX_EVENT_SIZE];
hci_command_hdr *cmd_hdr;
- int flags;
memset(cmd, 0x0, HCI_MAX_CMD_SIZE);
@@ -1699,7 +1694,6 @@ int addon_feature_req(int fd)
unsigned char cmd[HCI_MAX_CMD_SIZE];
unsigned char rsp[HCI_MAX_EVENT_SIZE];
hci_command_hdr *cmd_hdr;
- int flags;
memset(cmd, 0x0, HCI_MAX_CMD_SIZE);
@@ -1762,7 +1756,6 @@ int rome_wipower_forward_handoff_req(int fd)
unsigned char cmd[HCI_MAX_CMD_SIZE];
unsigned char rsp[HCI_MAX_EVENT_SIZE];
hci_command_hdr *cmd_hdr;
- int flags;
memset(cmd, 0x0, HCI_MAX_CMD_SIZE);