Skip to content

Commit e62a931

Browse files
aescolarnordicjm
authored andcommitted
[nrf fromtree] Bluetooth: Host: ATT: Fix build warning with clang
Fix the following warning att.c:734:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions] 734 | k_tid_t current_thread = k_current_get(); | ^ By wrapping that code as a compound statement Signed-off-by: Alberto Escolar Piedras <[email protected]> (cherry picked from commit 1dab77b)
1 parent c8ceb3b commit e62a931

File tree

1 file changed

+2
-1
lines changed
  • subsys/bluetooth/host

1 file changed

+2
-1
lines changed

subsys/bluetooth/host/att.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ static struct net_buf *bt_att_chan_create_pdu(struct bt_att_chan *chan, uint8_t
720720
/* Use a timeout only when responding/confirming */
721721
timeout = BT_ATT_TIMEOUT;
722722
break;
723-
default:
723+
default: {
724724
k_tid_t current_thread = k_current_get();
725725

726726
if (current_thread == k_work_queue_thread_get(&k_sys_work_q)) {
@@ -733,6 +733,7 @@ static struct net_buf *bt_att_chan_create_pdu(struct bt_att_chan *chan, uint8_t
733733
timeout = K_FOREVER;
734734
}
735735
}
736+
}
736737

737738
/* This will reserve headspace for lower layers */
738739
buf = bt_l2cap_create_pdu_timeout(&att_pool, 0, timeout);

0 commit comments

Comments
 (0)