ArduinoBLE
ArduinoBLE copied to clipboard
Warnings when compiling this code
When you build the code in this library there are several warnings printed
- [x] ~~Order member initialization on
BLELocalCharacteristic
~~ (fixed by https://github.com/arduino-libraries/ArduinoBLE/pull/302) - [x] ~~Unused variables in:~~ (fixed by https://github.com/arduino-libraries/ArduinoBLE/pull/302)
- [x] ~~
HCIClass::tryResolveAddress
~~ - [x] ~~
HCIClass::handleEventPkt
(the whole else if statement did nothing)~~ - [x] ~~
L2CAPSignalingClass::handleSecurityData
(one initialization should be inside ofBLE_TRACE
)~~ - [x] ~~
BluetoothCryptoToolbox::f5
~~ - [x] ~~
BluetoothCryptoToolbox::testAh
~~ - [x] ~~
BluetoothCryptoToolbox::testg2
~~
- [x] ~~
- [x] ~~Uninitialized variable in
L2CAPSignalingClass::handleSecurityData
~~ (fixed by https://github.com/arduino-libraries/ArduinoBLE/pull/302) - [ ] Unenumerated case in
ArduinoBLE/src/utility/HCI.cpp
If someone could review that PR most of these things would be fixed.
If someone tells me what 0x0A means in that unenumerated case, I'm happy to add that to the enum as well
Additional context
Additional reports
- https://github.com/arduino-libraries/ArduinoBLE/issues/274
- https://github.com/arduino-libraries/ArduinoBLE/issues/346
This is still incomplete, there is also the unenumerated case in ArduinoBLE/src/utility/HCI.cpp, if someone can tell me what does 0x0A means in that file, I'll create a PR for it
Issue "Unenumerated case in ArduinoBLE/src/utility/HCI.cpp" not fixed . Depending on the Preferences "Compiler warnings" set to All or More there is an error message:
f:\Projects\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp: In member function 'virtual void HCIClass::handleEventPkt(uint8_t, uint8_t*)':
f:\Projects\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:991:7: error: case value '10' not in enumerated type 'LE_META_EVENT' [-Werror=switch]
case 0x0A:{
^~~~
cc1plus.exe: some warnings being treated as errors