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
Fix several compile warnings on GCC #10377
Merged
JosJuice
merged 8 commits into
dolphin-emu:master
from
Pokechu22:warning-fixes-jan-2022
Feb 18, 2022
Merged
Fix several compile warnings on GCC #10377
JosJuice
merged 8 commits into
dolphin-emu:master
from
Pokechu22:warning-fixes-jan-2022
Feb 18, 2022
Conversation
This file contains 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
7d554f4
to
7518d3a
Compare
shuffle2
reviewed
Jan 17, 2022
|
silencing the |
244a2ba
to
0cf7ab9
Compare
9b773e4
to
3f83bdc
Compare
This resulted in an out-of-bounds array access, since sr is only 16 entries long and SPR_IBAT0U evaluates to 528.
The size variable started to be unused when I created std::array variants of ReadArray, but we should follow it in case any files have fewer registers stored than they should (otherwise the remaining registers would end up with garbage data from later in the fifolog). Though, there probably aren't many fifologs where this is relevant.
GCC generates warnings about these, although the variable being shadowed is not captured by the lambda.
It's unused in the case that T is unsigned and dest is signed (e.g. SaturatingCast<int, size_t> which appears SetIsoPaths in MainSettings.cpp)
The DSP JIT only applies on x64, so if it doesn't work on esoteric compilers then that's not a problem. (And if it fails to compile, then it'll still produce an error on that platform, just no warnings on other platforms)
3f83bdc
to
d2ebbfb
Compare
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.
See https://dolphin.ci/#/builders/19/builds/5836 for most of them. Some of these fixes solve actual problems (e.g. #10298 (review)), but several are just false positives.
I haven't included the fix from #10374, nor have I fixed the memcpy-relatated warnings or the conversion from
unsigned inttounsigned int:21in PixelShaderGen.