-
Notifications
You must be signed in to change notification settings - Fork 27
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
Compile error when excluding UART #25
Comments
I have added |
HI Dave |
Hi Paul Yes, commenting out the lines that handle the UART also works. I think the complier error may result from a change in version 2.2.0 of the Particle device os (see particle-iot/device-os#2323). My C++ skills are not sufficient to determine whether this is a genuine issue with your code, or in the Particle implementation. |
I'm guessing that the error results from the fact that no value is returned under the theoretically possible condition that UART is disabled and Happy to be corrected if I've misunderstood. |
There is a check on BOTH UART and I2C begin disabled during compile to cause an error message, but indeed only in that situation it could happen. The compiler s pre-processor is in error in it should handle the #if defined rules correctly and include and exclude the right code as a result. But there is always a work-around :-) regards |
closed |
Hi Paul
When I comment out
#define INCLUDE_UART 1
I get a compile error:[...] /sps30.cpp:772:1: error: control reaches end of non-void function [-Werror=return-type]
772 | }
I'm compiling for a Particle Boron using Particle Workbench (MS Visual Code).
Thanks
Dave
The text was updated successfully, but these errors were encountered: