-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
[BUG] Erroneous #elif with no condition in SPIFlashStorage.cpp (line 226). Should be #else. #19407
Comments
rhapsodyv
added a commit
to rhapsodyv/Marlin
that referenced
this issue
Sep 15, 2020
It wasn't breaking because the else was never taken, but its a typo and it was reported in MarlinFirmware#19407.
Now merged. Closing. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug Description
Not exactly a bug, but certainly an error.
In SPIFlashStorage.cpp around line 226 is the sequence...
The use of #elif without a condition instead of the correct #else means that a PlatformIO Inspect fails even though the code compiles.
Steps to Reproduce
In PlatformIO, run Inspect, it fails with "Errors: Bad JSON".
Run "pio check -v" (cppcheck) and it reports:
Marlin\src\lcd\extui\lib\mks_ui\SPIFlashStorage.cpp:226: [high:error] Syntax error in #elif [preprocessorErrorDirective]
Code should use #if...#else...#endif syntax unless there is a further condition to test.
Additional Information
The text was updated successfully, but these errors were encountered: