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
With GCC 13 and -flto disabled, we were getting warnings like:
../../pybricks/common/pb_type_ble.c:291:21: error: array subscript 5 is outside the bounds of an interior zero-length array 'uint8_t[0]' {aka 'unsigned char[]'} [-Werror=zero-length-bounds]
291 | value.v.data[5] = PB_BLE_BROADCAST_DATA_TYPE_SINGLE_OBJECT << 5;
| ~
Instead of using the zero-length array, access the d member directly.
This allows the compiler to actually check for out of bounds access
and warn us about it.
0 commit comments