diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-09-26 16:01:54 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-09-27 12:25:37 -0700 |
commit | 643b074d7dc7f722588192eea852ce2e0d0584ae (patch) | |
tree | 7c85a4721bc4c4abffdc6795a48b490fbd6a7723 /monitor | |
parent | de1901565979b5f56effc34b03594bee4f757f7d (diff) | |
download | bluez-643b074d7dc7f722588192eea852ce2e0d0584ae.tar.gz |
monitor/analyze: Fix scan-build warnings
This fixes the following warnings:
monitor/analyze.c:381:2: warning: Value stored to 'data' is never read
[deadcode.DeadStores]
data += sizeof(*hdr);
^ ~~~~~~~~~~~~
monitor/analyze.c:382:2: warning: Value stored to 'size' is never read
[deadcode.DeadStores]
size -= sizeof(*hdr);
^ ~~~~~~~~~~~~
monitor/analyze.c:398:2: warning: Value stored to 'data' is never read
[deadcode.DeadStores]
data += sizeof(*evt);
^ ~~~~~~~~~~~~
monitor/analyze.c:399:2: warning: Value stored to 'size' is never read
[deadcode.DeadStores]
size -= sizeof(*evt);
^ ~~~~~~~~~~~~
monitor/analyze.c:418:2: warning: Value stored to 'data' is never read
[deadcode.DeadStores]
data += sizeof(*evt);
^ ~~~~~~~~~~~~
monitor/analyze.c:419:2: warning: Value stored to 'size' is never read
[deadcode.DeadStores]
size -= sizeof(*evt);
^ ~~~~~~~~~~~~
monitor/analyze.c:527:2: warning: Value stored to 'data' is never read
[deadcode.DeadStores]
data += sizeof(subtype);
^ ~~~~~~~~~~~~~~~
monitor/analyze.c:528:2: warning: Value stored to 'size' is never read
[deadcode.DeadStores]
size -= sizeof(subtype);
^ ~~~~~~~~~~~~~~~
monitor/analyze.c:629:2: warning: Value stored to 'data' is never read
[deadcode.DeadStores]
data += sizeof(*hdr);
^ ~~~~~~~~~~~~
monitor/analyze.c:630:2: warning: Value stored to 'size' is never read
[deadcode.DeadStores]
size -= sizeof(*hdr);
^ ~~~~~~~~~~~~
monitor/analyze.c:646:2: warning: Value stored to 'data' is never read
[deadcode.DeadStores]
data += sizeof(*hdr);
^ ~~~~~~~~~~~~
monitor/analyze.c:647:2: warning: Value stored to 'size' is never read
[deadcode.DeadStores]
size -= sizeof(*hdr);
^ ~~~~~~~~~~~~
monitor/analyze.c:710:2: warning: Value stored to 'data' is never read
[deadcode.DeadStores]
data += sizeof(*hdr);
^ ~~~~~~~~~~~~
monitor/analyze.c:711:2: warning: Value stored to 'size' is never read
[deadcode.DeadStores]
size -= sizeof(*hdr);
^ ~~~~~~~~~~~~
Diffstat (limited to 'monitor')
-rw-r--r-- | monitor/analyze.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/monitor/analyze.c b/monitor/analyze.c index 50e7e5542..a20ba98b0 100644 --- a/monitor/analyze.c +++ b/monitor/analyze.c @@ -375,12 +375,8 @@ static void del_index(struct timeval *tv, uint16_t index, static void command_pkt(struct timeval *tv, uint16_t index, const void *data, uint16_t size) { - const struct bt_hci_cmd_hdr *hdr = data; struct hci_dev *dev; - data += sizeof(*hdr); - size -= sizeof(*hdr); - dev = dev_lookup(index); if (!dev) return; @@ -395,9 +391,6 @@ static void evt_conn_complete(struct hci_dev *dev, struct timeval *tv, const struct bt_hci_evt_conn_complete *evt = data; struct hci_conn *conn; - data += sizeof(*evt); - size -= sizeof(*evt); - if (evt->status) return; @@ -415,9 +408,6 @@ static void evt_disconnect_complete(struct hci_dev *dev, struct timeval *tv, const struct bt_hci_evt_disconnect_complete *evt = data; struct hci_conn *conn; - data += sizeof(*evt); - size -= sizeof(*evt); - if (evt->status) return; @@ -522,13 +512,6 @@ static void evt_num_completed_packets(struct hci_dev *dev, struct timeval *tv, static void evt_le_meta_event(struct hci_dev *dev, struct timeval *tv, const void *data, uint16_t size) { - uint8_t subtype = get_u8(data); - - data += sizeof(subtype); - size -= sizeof(subtype); - - switch (subtype) { - } } static void event_pkt(struct timeval *tv, uint16_t index, @@ -623,12 +606,8 @@ static void acl_pkt(struct timeval *tv, uint16_t index, bool out, static void sco_pkt(struct timeval *tv, uint16_t index, const void *data, uint16_t size) { - const struct bt_hci_sco_hdr *hdr = data; struct hci_dev *dev; - data += sizeof(*hdr); - size -= sizeof(*hdr); - dev = dev_lookup(index); if (!dev) return; @@ -643,9 +622,6 @@ static void info_index(struct timeval *tv, uint16_t index, const struct btsnoop_opcode_index_info *hdr = data; struct hci_dev *dev; - data += sizeof(*hdr); - size -= sizeof(*hdr); - dev = dev_lookup(index); if (!dev) return; @@ -704,12 +680,8 @@ static void ctrl_msg(struct timeval *tv, uint16_t index, static void iso_pkt(struct timeval *tv, uint16_t index, const void *data, uint16_t size) { - const struct bt_hci_iso_hdr *hdr = data; struct hci_dev *dev; - data += sizeof(*hdr); - size -= sizeof(*hdr); - dev = dev_lookup(index); if (!dev) return; |