Skip to content

Compiler error no return statement in function returning non-void #244

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

Closed
ln-12 opened this issue Jul 5, 2022 · 0 comments · Fixed by #251
Closed

Compiler error no return statement in function returning non-void #244

ln-12 opened this issue Jul 5, 2022 · 0 comments · Fixed by #251
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@ln-12
Copy link

ln-12 commented Jul 5, 2022

I want to use this library in my PlatformIO/Arduino project unsing an Arduino Nano RP2040 Connect. Unfortunately, I get this compiler error because there are no return statements in these four functions:

.pio/libdeps/rp2040dev-unix-release/ArduinoBLE/src/utility/HCI.cpp: In member function 'virtual int HCIClass::saveNewAddress(uint8_t, uint8_t*, uint8_t*, uint8_t*)':
.pio/libdeps/rp2040dev-unix-release/ArduinoBLE/src/utility/HCI.cpp:469:1: error: no return statement in function returning non-void [-Werror=return-type]
  469 | }
      | ^
.pio/libdeps/rp2040dev-unix-release/ArduinoBLE/src/utility/HCI.cpp: In member function 'virtual int HCIClass::leAddResolvingAddress(uint8_t, uint8_t*, uint8_t*, uint8_t*)':
.pio/libdeps/rp2040dev-unix-release/ArduinoBLE/src/utility/HCI.cpp:496:1: error: no return statement in function returning non-void [-Werror=return-type]
  496 | }
      | ^
.pio/libdeps/rp2040dev-unix-release/ArduinoBLE/src/utility/HCI.cpp: In member function 'virtual int HCIClass::writeLK(uint8_t*, uint8_t*)':
.pio/libdeps/rp2040dev-unix-release/ArduinoBLE/src/utility/HCI.cpp:540:1: error: no return statement in function returning non-void [-Werror=return-type]
  540 | }
      | ^
.pio/libdeps/rp2040dev-unix-release/ArduinoBLE/src/utility/HCI.cpp: In member function 'virtual int HCIClass::readStoredLKs()':
.pio/libdeps/rp2040dev-unix-release/ArduinoBLE/src/utility/HCI.cpp:544:1: error: no return statement in function returning non-void [-Werror=return-type]
  544 | }
      | ^

Am I missing something here or how is this supposed to compile?

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Jul 5, 2022
@per1234 per1234 linked a pull request Aug 20, 2022 that will close this issue
@per1234 per1234 added the conclusion: resolved Issue was resolved label Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved 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.

2 participants