Skip to content

Commit 62f62db

Browse files
cfriedtjhedberg
authored andcommitted
bluetooth: classic: shell: mitigate label followed by declaration
A recent change triggered a warning in LLVM that was promoted to error when run with twister. ```shell goep.c:102:3: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions] 102 | int err; ``` Add a scope to the switch case so that the declaration has proper scope. Signed-off-by: Chris Friedt <[email protected]>
1 parent 41120bf commit 62f62db

File tree

1 file changed

+2
-2
lines changed
  • subsys/bluetooth/host/classic/shell

1 file changed

+2
-2
lines changed

subsys/bluetooth/host/classic/shell/goep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ static bool goep_parse_headers_cb(struct bt_obex_hdr *hdr, void *user_data)
9898
switch (hdr->id) {
9999
case BT_OBEX_HEADER_ID_APP_PARAM:
100100
case BT_OBEX_HEADER_ID_AUTH_CHALLENGE:
101-
case BT_OBEX_HEADER_ID_AUTH_RSP:
101+
case BT_OBEX_HEADER_ID_AUTH_RSP: {
102102
int err;
103103

104104
err = bt_obex_tlv_parse(hdr->len, hdr->data, goep_parse_tlvs_cb, NULL);
105105
if (err) {
106106
bt_shell_error("Fail to parse OBEX TLV triplet");
107107
}
108-
break;
108+
} break;
109109
default:
110110
bt_shell_hexdump(hdr->data, hdr->len);
111111
break;

0 commit comments

Comments
 (0)