You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nimble/gatt: Fix GCC 10 build with no BLE_GATT_WRITE_RELIABLE
When BLE_GATT_WRITE_RELIABLE handling of BLE_GATT_OP_WRITE_RELIABLE
is not needed and is detected by gcc as:
Error: repos/apache-mynewt-nimble/nimble/host/src/ble_gattc.c: In function 'ble_gattc_proc_free':
repos/apache-mynewt-nimble/nimble/host/src/ble_gattc.c:709:66: error: array subscript 254 is outside the bounds of an interior zero-length array 'struct ble_gatt_attr[0]' [-Werror=zero-length-bounds]
709 | os_mbuf_free_chain(proc->write_reliable.attrs[i].om);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
repos/apache-mynewt-nimble/nimble/host/src/ble_gattc.c:199:34: note: while referencing 'attrs'
199 | struct ble_gatt_attr attrs[MYNEWT_VAL(BLE_GATT_WRITE_MAX_ATTRS)];
| ^~~~~
cc1: all warnings being treated as errors
This change gets rid of offending code that is not needed when BLE_GATT_WRITE_LONG
or BLE_GATT_WRITE_RELIABLE are 0.
0 commit comments