aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-04-25 18:20:28 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-04-25 18:20:28 +0000
commit7300c07991e05e66e04528aa1c72e31c127a79cd (patch)
treef99c84710cec97b53166600d7ae83c9b0f6765a7 /hw
parent2cc2026063a7500670a76edd5ece59936ceec441 (diff)
bt: remove dead assignments, spotted by clang analyzer
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/bt-hci-csr.c4
-rw-r--r--hw/bt-hci.c7
2 files changed, 3 insertions, 8 deletions
diff --git a/hw/bt-hci-csr.c b/hw/bt-hci-csr.c
index 7300ea6799..982577d1bb 100644
--- a/hw/bt-hci-csr.c
+++ b/hw/bt-hci-csr.c
@@ -226,7 +226,7 @@ static void csrhci_in_packet(struct csrhci_s *s, uint8_t *pkt)
*rpkt ++ = 0x20; /* Operational settings negotation Ok */
memcpy(rpkt, pkt, 7); rpkt += 7;
*rpkt ++ = 0xff;
- *rpkt ++ = 0xff;
+ *rpkt = 0xff;
break;
case H4_ALIVE_PKT:
@@ -238,7 +238,7 @@ static void csrhci_in_packet(struct csrhci_s *s, uint8_t *pkt)
rpkt = csrhci_out_packet_csr(s, H4_ALIVE_PKT, 2);
*rpkt ++ = 0xcc;
- *rpkt ++ = 0x00;
+ *rpkt = 0x00;
break;
default:
diff --git a/hw/bt-hci.c b/hw/bt-hci.c
index 669866a5c3..f1ee92cfd4 100644
--- a/hw/bt-hci.c
+++ b/hw/bt-hci.c
@@ -994,13 +994,12 @@ static int bt_hci_features_req(struct bt_hci_s *hci, uint16_t handle)
static int bt_hci_version_req(struct bt_hci_s *hci, uint16_t handle)
{
- struct bt_device_s *slave;
evt_read_remote_version_complete params;
if (bt_hci_handle_bad(hci, handle))
return -ENODEV;
- slave = bt_hci_remote_dev(hci, handle);
+ bt_hci_remote_dev(hci, handle);
bt_hci_event_status(hci, HCI_SUCCESS);
@@ -2080,7 +2079,6 @@ static void bt_submit_sco(struct HCIInfo *info,
const uint8_t *data, int length)
{
struct bt_hci_s *hci = hci_from_info(info);
- struct bt_link_s *link;
uint16_t handle;
int datalen;
@@ -2089,7 +2087,6 @@ static void bt_submit_sco(struct HCIInfo *info,
handle = acl_handle((data[1] << 8) | data[0]);
datalen = data[2];
- data += 3;
length -= 3;
if (bt_hci_handle_bad(hci, handle)) {
@@ -2097,7 +2094,6 @@ static void bt_submit_sco(struct HCIInfo *info,
__FUNCTION__, handle);
return;
}
- handle &= ~HCI_HANDLE_OFFSET;
if (datalen > length) {
fprintf(stderr, "%s: SCO packet too short (%iB < %iB)\n",
@@ -2105,7 +2101,6 @@ static void bt_submit_sco(struct HCIInfo *info,
return;
}
- link = hci->lm.handle[handle].link;
/* TODO */
/* TODO: increase counter and send EVT_NUM_COMP_PKTS if synchronous