Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings when compiling this code #310

Open
9 of 10 tasks
roleroz opened this issue Jul 20, 2023 · 2 comments · Fixed by #302
Open
9 of 10 tasks

Warnings when compiling this code #310

roleroz opened this issue Jul 20, 2023 · 2 comments · Fixed by #302
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@roleroz
Copy link
Contributor

roleroz commented Jul 20, 2023

When you build the code in this library there are several warnings printed

  • Order member initialization on BLELocalCharacteristic (fixed by Fix warnings #302)
  • Unused variables in: (fixed by Fix warnings #302)
    • HCIClass::tryResolveAddress
    • HCIClass::handleEventPkt (the whole else if statement did nothing)
    • L2CAPSignalingClass::handleSecurityData (one initialization should be inside of BLE_TRACE)
    • BluetoothCryptoToolbox::f5
    • BluetoothCryptoToolbox::testAh
    • BluetoothCryptoToolbox::testg2
  • Uninitialized variable in L2CAPSignalingClass::handleSecurityData (fixed by Fix warnings #302)
  • Unenumerated case in ArduinoBLE/src/utility/HCI.cpp
I have a PR ready for fixing most of these warnings (all except the last one) in https://github.com//pull/302, but I haven't had luck getting any traction on getting that reviewed

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

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Jul 20, 2023
@per1234 per1234 linked a pull request Jul 20, 2023 that will close this issue
@roleroz
Copy link
Contributor Author

roleroz commented Aug 4, 2023

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

@roleroz roleroz mentioned this issue Aug 4, 2023
@per1234 per1234 added conclusion: resolved Issue was resolved and removed conclusion: resolved Issue was resolved labels Aug 5, 2023
@per1234 per1234 reopened this Aug 5, 2023
@ataweg
Copy link

ataweg commented Jan 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants