Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apps/bttester: Fix compilation with GCC 13
GCC 13 is complaining about zero elemen array that is not at the end of structure. Error: repos/apache-mynewt-nimble/apps/bttester/src/btp_gap.c: In function 'start_advertising': repos/apache-mynewt-nimble/apps/bttester/src/btp_gap.c:467:29: error: array subscript 514 is outside the bounds of an interior zero-length array 'const uint8_t[0]' {aka 'const unsigned char[]'} [-Werror=zero-length-bounds] 467 | addr_type = cp->adv_data[cp->adv_data_len + | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ 468 | cp->scan_rsp_len + | ~~~~~~~~~~~~~~~~~~ 469 | sizeof(duration)]; | ~~~~~~~~~~~~~~~~~ In file included from repos/apache-mynewt-nimble/apps/bttester/src/btp/btp.h:31, from repos/apache-mynewt-nimble/apps/bttester/src/btp_gap.c:36: repos/apache-mynewt-nimble/apps/bttester/src/btp/btp_gap.h:138:13: note: while referencing 'adv_data' 138 | uint8_t adv_data[0]; | ^~~~~~~~ cc1: all warnings being treated as errors
- Loading branch information