-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
[C++ Headers] Non-sensical auto-generated if-statement leads to compilation error when compiled with -Werror
#271
Comments
The code is, indeed, suboptimal, but not incorrect, while your build process is somewhat misconfigured. Third-party code should not be processed with strict error settings, as it makes the build unnecessarily fragile and prone to failure like in your case. You should modify your build recipe to include Nunavut-generated headers as system headers to fix the problem. For GCC and clang, the correct flag is |
I'm only partially convinced. If OpenCyphal targets reliable systems its to be expected that whole codebase (including auto-generated code) does not break when using |
The matter of
|
I'm inclined to accept this bug. I don't like normalizing deviance and if we can generate code that avoid well-known compiler warnings we should. |
This should be fixed with 2.0.7 |
As the compiler says, a uint8_t can not have an larger value than 255, consequently the if statement is dead code.
Compiler error
reg/udral/service/battery/Status_0_2.hpp
The text was updated successfully, but these errors were encountered: