Skip to content
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
merged 8 commits into from Feb 18, 2022

Conversation

Pokechu22
Copy link
Contributor

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 int to unsigned int:21 in PixelShaderGen.

Source/Core/Core/Core.cpp Outdated Show resolved Hide resolved
@shuffle2
Copy link
Contributor

silencing the invalid-offsetof is a little sketchy, but eh

@Pokechu22 Pokechu22 force-pushed the warning-fixes-jan-2022 branch 3 times, most recently from 9b773e4 to 3f83bdc Compare February 13, 2022 20:47
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)
@Pokechu22
Copy link
Contributor Author

Here's a new clean build log: build.log. This combined with #10374 resolves a lot of warnings, but it seems like some new ones have crept in. It'd be nice to get this merged soon (I'd rather fix the new warnings in a separate PR).

@JosJuice JosJuice merged commit 35b436b into dolphin-emu:master Feb 18, 2022
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants