fix: several compilation issues under LLVM and more#2753
Open
basilfx wants to merge 4 commits intoolikraus:masterfrom
Open
fix: several compilation issues under LLVM and more#2753basilfx wants to merge 4 commits intoolikraus:masterfrom
basilfx wants to merge 4 commits intoolikraus:masterfrom
Conversation
674bbfb to
ba6a962
Compare
When assert(..) is a no-op, compilers may warn about the variable being unused. Explicitly marking it to silence the warning.
ba6a962 to
eeb416e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am upgrading the U8g2 package version in RIOT-OS. This PR fixes some of the compilation errors I encountered.
I have been able to test this against some displays and board I own. But the warnings below occur in drivers and functionality I cannot test.
Comparison of integers of mixed signs:
This fails for MSP-430 (16-bit targets). Casting
radtou8g2_int_tsolves it.Unused variables (LLVM):
These variables are assigned to, but never read from.
Memory alignment requirement (LLVM):
Using
memcpyinstead resolves this issue.Mark variable as unused (LLVM):
max_ptris only used inassert(..), which may be a no-op if assertions are disabled. Mark it as unused resolves this.