Bluetooth: rework to support C++20 designated initializers
C++ does not allow chaining of data members when identifying the designator. Since the generic structure has only one member remove the designator from its internal initializer. Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
parent
d9611be72d
commit
bf5817d273
3 changed files with 5 additions and 5 deletions
|
@ -52,19 +52,19 @@ struct bt_uuid_128 {
|
||||||
|
|
||||||
#define BT_UUID_INIT_16(value) \
|
#define BT_UUID_INIT_16(value) \
|
||||||
{ \
|
{ \
|
||||||
.uuid.type = BT_UUID_TYPE_16, \
|
.uuid = { BT_UUID_TYPE_16 }, \
|
||||||
.val = (value), \
|
.val = (value), \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BT_UUID_INIT_32(value) \
|
#define BT_UUID_INIT_32(value) \
|
||||||
{ \
|
{ \
|
||||||
.uuid.type = BT_UUID_TYPE_32, \
|
.uuid = { BT_UUID_TYPE_32 }, \
|
||||||
.val = (value), \
|
.val = (value), \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BT_UUID_INIT_128(value...) \
|
#define BT_UUID_INIT_128(value...) \
|
||||||
{ \
|
{ \
|
||||||
.uuid.type = BT_UUID_TYPE_128, \
|
.uuid = { BT_UUID_TYPE_128 }, \
|
||||||
.val = { value }, \
|
.val = { value }, \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
* big endian 0x2800 : [28 00] -> swapping required
|
* big endian 0x2800 : [28 00] -> swapping required
|
||||||
*/
|
*/
|
||||||
static const struct bt_uuid_128 uuid128_base = {
|
static const struct bt_uuid_128 uuid128_base = {
|
||||||
.uuid.type = BT_UUID_TYPE_128,
|
.uuid = { BT_UUID_TYPE_128 },
|
||||||
.val = { BT_UUID_128_ENCODE(
|
.val = { BT_UUID_128_ENCODE(
|
||||||
0x00000000, 0x0000, 0x1000, 0x8000, 0x00805F9B34FB) }
|
0x00000000, 0x0000, 0x1000, 0x8000, 0x00805F9B34FB) }
|
||||||
};
|
};
|
||||||
|
|
|
@ -167,7 +167,7 @@ int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers)
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_DEBUG)) {
|
if (IS_ENABLED(CONFIG_BT_DEBUG)) {
|
||||||
const struct bt_mesh_prov *prov = bt_mesh_prov_get();
|
const struct bt_mesh_prov *prov = bt_mesh_prov_get();
|
||||||
struct bt_uuid_128 uuid = { .uuid.type = BT_UUID_TYPE_128 };
|
struct bt_uuid_128 uuid = { .uuid = { BT_UUID_TYPE_128 } };
|
||||||
|
|
||||||
memcpy(uuid.val, prov->uuid, 16);
|
memcpy(uuid.val, prov->uuid, 16);
|
||||||
BT_INFO("Device UUID: %s", bt_uuid_str(&uuid.uuid));
|
BT_INFO("Device UUID: %s", bt_uuid_str(&uuid.uuid));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue