You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/05/13 13:01:31 UTC
[GitHub] [mynewt-nimble] Kampi opened a new issue, #1258: Bug: ".../nimble/host/include/host/ble_uuid.h:97:9: error: expected primary-expression before '.' token"
Kampi opened a new issue, #1258:
URL: https://github.com/apache/mynewt-nimble/issues/1258
**Problem Description**
Using `static const ble_uuid128_t gatt_svr_svc_sec_test_uuid = BLE_UUID128_INIT(0x2d, 0x71, 0xa2, 0x59, 0xb4, 0x58, 0xc8, 0x12, 0x99, 0x99, 0x43, 0x95, 0x12, 0x2f, 0x46, 0x59);` from the NimBLE `bleprph` example will produce the error:
```
In file included from C:/.platformio/packages/framework-espidf/components/bt/host/nimble/nimble/nimble/host/include/host/ble_hs_adv.h:24,
from C:/.platformio/packages/framework-espidf/components/bt/host/nimble/nimble/nimble/host/include/host/ble_gap.h:32,
from C:/.platformio/packages/framework-espidf/components/bt/host/nimble/nimble/nimble/host/include/host/ble_hs.h:33,
from src/Bluetooth/bluetooth.cpp:9:
C:/.platformio/packages/framework-espidf/components/bt/host/nimble/nimble/nimble/host/include/host/ble_uuid.h:97:9: error: expected primary-expression before '.' token
.u.type = BLE_UUID_TYPE_128, \
```
**Reason**
The macro uses the wrong structure format.
**Fix**
Change the macros to
```
#define BLE_UUID16_INIT(uuid16) \
{ \
.u = { \
.type = BLE_UUID_TYPE_16, \
}, \
.value = { uuid16 }, \
}
#define BLE_UUID32_INIT(uuid32) \
{ \
.u = { \
.type = BLE_UUID_TYPE_32, \
}, \
.value = { uuid32 }, \
}
#define BLE_UUID128_INIT(uuid128...) \
{ \
.u = { \
.type = BLE_UUID_TYPE_128, \
}, \
.value = { uuid128 }, \
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mynewt-nimble] Kampi closed issue #1258: Bug: ".../nimble/host/include/host/ble_uuid.h:97:9: error: expected primary-expression before '.' token"
Posted by GitBox <gi...@apache.org>.
Kampi closed issue #1258: Bug: ".../nimble/host/include/host/ble_uuid.h:97:9: error: expected primary-expression before '.' token"
URL: https://github.com/apache/mynewt-nimble/issues/1258
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mynewt-nimble] sjanc commented on issue #1258: Bug: ".../nimble/host/include/host/ble_uuid.h:97:9: error: expected primary-expression before '.' token"
Posted by GitBox <gi...@apache.org>.
sjanc commented on issue #1258:
URL: https://github.com/apache/mynewt-nimble/issues/1258#issuecomment-1127414263
but what compiler is used, GCC? clang? and what version
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mynewt-nimble] Kampi commented on issue #1258: Bug: ".../nimble/host/include/host/ble_uuid.h:97:9: error: expected primary-expression before '.' token"
Posted by GitBox <gi...@apache.org>.
Kampi commented on issue #1258:
URL: https://github.com/apache/mynewt-nimble/issues/1258#issuecomment-1127492368
It´s GCC and it should be version 8.4 if I´m correct.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mynewt-nimble] Kampi commented on issue #1258: Bug: ".../nimble/host/include/host/ble_uuid.h:97:9: error: expected primary-expression before '.' token"
Posted by GitBox <gi...@apache.org>.
Kampi commented on issue #1258:
URL: https://github.com/apache/mynewt-nimble/issues/1258#issuecomment-1127365922
The bug occurs when compiling NimBLE with the newest version of the esp-idf (`4.4.1`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mynewt-nimble] Kampi commented on issue #1258: Bug: ".../nimble/host/include/host/ble_uuid.h:97:9: error: expected primary-expression before '.' token"
Posted by GitBox <gi...@apache.org>.
Kampi commented on issue #1258:
URL: https://github.com/apache/mynewt-nimble/issues/1258#issuecomment-1135421581
Can be closed. The solution is accepted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mynewt-nimble] sjanc commented on issue #1258: Bug: ".../nimble/host/include/host/ble_uuid.h:97:9: error: expected primary-expression before '.' token"
Posted by GitBox <gi...@apache.org>.
sjanc commented on issue #1258:
URL: https://github.com/apache/mynewt-nimble/issues/1258#issuecomment-1127290809
what toolchain is it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org