Bluetooth: Fix -Wunused-but-set-variable
Fix -Wunused-but-set-variable Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
parent
4cbe77dbdb
commit
e0dfdd6723
2 changed files with 2 additions and 8 deletions
|
@ -435,12 +435,8 @@ static inline bool att_chan_is_connected(struct bt_att_chan *chan)
|
||||||
static int bt_att_chan_send(struct bt_att_chan *chan, struct net_buf *buf,
|
static int bt_att_chan_send(struct bt_att_chan *chan, struct net_buf *buf,
|
||||||
bt_att_chan_sent_t cb)
|
bt_att_chan_sent_t cb)
|
||||||
{
|
{
|
||||||
struct bt_att_hdr *hdr;
|
|
||||||
|
|
||||||
hdr = (void *)buf->data;
|
|
||||||
|
|
||||||
BT_DBG("chan %p flags %u code 0x%02x", chan, atomic_get(chan->flags),
|
BT_DBG("chan %p flags %u code 0x%02x", chan, atomic_get(chan->flags),
|
||||||
hdr->code);
|
((struct bt_att_hdr *)buf->data)->code);
|
||||||
|
|
||||||
return chan_send(chan, buf, cb);
|
return chan_send(chan, buf, cb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4348,7 +4348,7 @@ static void gatt_write_ccc_rsp(struct bt_conn *conn, uint8_t err,
|
||||||
/* if write to CCC failed we remove subscription and notify app */
|
/* if write to CCC failed we remove subscription and notify app */
|
||||||
if (err) {
|
if (err) {
|
||||||
struct gatt_sub *sub;
|
struct gatt_sub *sub;
|
||||||
sys_snode_t *node, *tmp, *prev = NULL;
|
sys_snode_t *node, *tmp;
|
||||||
|
|
||||||
sub = gatt_sub_find(conn);
|
sub = gatt_sub_find(conn);
|
||||||
if (!sub) {
|
if (!sub) {
|
||||||
|
@ -4360,8 +4360,6 @@ static void gatt_write_ccc_rsp(struct bt_conn *conn, uint8_t err,
|
||||||
gatt_sub_remove(conn, sub, tmp, params);
|
gatt_sub_remove(conn, sub, tmp, params);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
prev = node;
|
|
||||||
}
|
}
|
||||||
} else if (!params->value) {
|
} else if (!params->value) {
|
||||||
/* Notify with NULL data to complete unsubscribe */
|
/* Notify with NULL data to complete unsubscribe */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue