Bluetooth: Fix -Wunused-but-set-variable

Fix -Wunused-but-set-variable

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
Lingao Meng 2021-07-28 04:45:51 -07:00 committed by Carles Cufí
commit e0dfdd6723
2 changed files with 2 additions and 8 deletions

View file

@ -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,
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),
hdr->code);
((struct bt_att_hdr *)buf->data)->code);
return chan_send(chan, buf, cb);
}

View file

@ -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 (err) {
struct gatt_sub *sub;
sys_snode_t *node, *tmp, *prev = NULL;
sys_snode_t *node, *tmp;
sub = gatt_sub_find(conn);
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);
break;
}
prev = node;
}
} else if (!params->value) {
/* Notify with NULL data to complete unsubscribe */