-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Resolve various compiler warnings #11534
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
Conversation
228d30b to
73c289b
Compare
|
The CPUCull one is because the unknown pragma warning comes from the preprocessor (see bug 89038) and is fixed in GCC 13 (see bug 53431), though that has not yet released. The DualShockUDPClient one is also fixed in GCC 11 (bug 96963) (though it still exists in GCC 10, which is why they haven't marked it as fixed, I think). I happened to be using GCC 10 to test locally. I created a report for the PixelShaderGen bitfield issue: bug 108670. |
| auto& core_timing = system.GetCoreTiming(); | ||
| s_finish_init_event = core_timing.RegisterEvent( | ||
| "IOS-ESFinishInit", [](Core::System& system, u64, s64) { GetIOS()->GetES()->FinishInit(); }); | ||
| "IOS-ESFinishInit", [](Core::System& system_, u64, s64) { GetIOS()->GetES()->FinishInit(); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one (and the following) don't use the system_ parameter; maybe we should just omit it like the u64/s64 after it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing at some point GetIOS() will be moved to System, so IMO it's still useful to rename it (if we don't come up with an alternative way of dealing with the shadowing warnings).
|
|
||
| s_event_enqueue = | ||
| core_timing.RegisterEvent("IPCEvent", [](Core::System& system, u64 userdata, s64) { | ||
| core_timing.RegisterEvent("IPCEvent", [](Core::System& system_, u64 userdata, s64) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same down here.
Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp
Outdated
Show resolved
Hide resolved
73c289b to
8ea617d
Compare
This code doesn't need to be portable (since the goal is to have a smaller offset for x64 codegen), so if it's not supported there are other problems. Similar code exists in e.g. DSP.cpp.
Otherwise, files that include the header get warning: ‘Discord::s_using_custom_client’ defined but not used.
…defined [-Wsequence-point]
…n switch [-Wswitch]
…warnings We need to copy padding in most of these cases, and the objects are trivially copyable; however, BitField prevents trivial copy-assignment.
8ea617d to
3024ca2
Compare
|
How are you gathering the warnings? (i.e. how did you make that list of the remaining warnings) |
|
In WSL (with GCC):
|
Many of these warnings are due to variable shadowing from the deglobalization changes. I'm not super happy about this, but I don't see any alternative (the options for
-Wshadowaren't fine-grained enough to disable it for lambdas that don't have capturing enabled or for constructor parameters with the same name as members).The remaining warnings are these:
Most of these are in external code. The attributes on
__m128iones are something I don't know how to fix (see https://stackoverflow.com/a/49216021 and https://stackoverflow.com/q/12942548; the latter has comments that imply that this shouldn't apply in C++17). The remainder seem to be compiler bugs which I will investigate further:CPUCullhas the warning explicitly ignored, but it still shows up;PixelShaderGendoesn't make sense astevindis a 21-bit bitfield; and theDualShockUDPClientone is complete nonsense as nothing string-related is happening there. I'll report these to the GCC team after I investigate further.