Skip to content

Commit 6f0e9ca

Browse files
ceolinjhedberg
authored andcommitted
bt: audio: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible array. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent ed1a671 commit 6f0e9ca

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

subsys/bluetooth/audio/has_internal.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct bt_has {
6868

6969
struct bt_has_cp_hdr {
7070
uint8_t opcode;
71-
uint8_t data[0];
71+
uint8_t data[];
7272
} __packed;
7373

7474
struct bt_has_cp_read_presets_req {
@@ -80,25 +80,25 @@ struct bt_has_cp_read_preset_rsp {
8080
uint8_t is_last;
8181
uint8_t index;
8282
uint8_t properties;
83-
uint8_t name[0];
83+
uint8_t name[];
8484
} __packed;
8585

8686
struct bt_has_cp_preset_changed {
8787
uint8_t change_id;
8888
uint8_t is_last;
89-
uint8_t additional_params[0];
89+
uint8_t additional_params[];
9090
} __packed;
9191

9292
struct bt_has_cp_generic_update {
9393
uint8_t prev_index;
9494
uint8_t index;
9595
uint8_t properties;
96-
uint8_t name[0];
96+
uint8_t name[];
9797
} __packed;
9898

9999
struct bt_has_cp_write_preset_name {
100100
uint8_t index;
101-
uint8_t name[0];
101+
uint8_t name[];
102102
} __packed;
103103

104104
struct bt_has_cp_set_active_preset {

subsys/bluetooth/audio/pacs_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ struct bt_pac_codec {
2323
struct bt_pac_ltv {
2424
uint8_t len;
2525
uint8_t type;
26-
uint8_t value[0];
26+
uint8_t value[];
2727
} __packed;
2828

2929
struct bt_pac_ltv_data {
3030
uint8_t len;
31-
struct bt_pac_ltv data[0];
31+
struct bt_pac_ltv data[];
3232
} __packed;
3333

3434
struct bt_pacs_read_rsp {

subsys/bluetooth/audio/tbs_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ struct bt_tbs_call_cp_retrieve {
246246

247247
struct bt_tbs_call_cp_originate {
248248
uint8_t opcode;
249-
uint8_t uri[0];
249+
uint8_t uri[];
250250
} __packed;
251251

252252
struct bt_tbs_call_cp_join {
253253
uint8_t opcode;
254-
uint8_t call_indexes[0];
254+
uint8_t call_indexes[];
255255
} __packed;
256256

257257
union bt_tbs_call_cp_t {

0 commit comments

Comments
 (0)