Bluetooth: Make macro definition compatible with 7-2018-q2-update g++

In C++ designated initializers require that designators used in the
expression must appear in the same order as the data members.

In addition, 7-2018-q2-update version of g++ doesn't support
implicit member initialization, so all members must be
initialized.

Signed-off-by: Alexey Eremin <a.eremin.msu@gmail.com>
This commit is contained in:
Alexey Eremin 2020-02-28 18:43:18 +01:00 committed by Johan Hedberg
commit 6f3f3c230c
2 changed files with 3 additions and 1 deletions

View file

@ -322,6 +322,7 @@ struct bt_le_adv_param {
*/
#define BT_LE_ADV_PARAM(_options, _int_min, _int_max) \
((struct bt_le_adv_param[]) { { \
.id = BT_ID_DEFAULT, \
.options = (_options), \
.interval_min = (_int_min), \
.interval_max = (_int_max), \

View file

@ -817,10 +817,11 @@ ssize_t bt_gatt_attr_read_cpf(struct bt_conn *conn,
#define BT_GATT_ATTRIBUTE(_uuid, _perm, _read, _write, _value) \
{ \
.uuid = _uuid, \
.perm = _perm, \
.read = _read, \
.write = _write, \
.user_data = _value, \
.handle = 0, \
.perm = _perm, \
}
/** @brief Notification complete result callback.