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

Resolve Linux GCC Warnings #10624

Merged
merged 1 commit into from Jul 2, 2022

Conversation

Minty-Meeo
Copy link
Contributor

These annoyed me, so I fixed them.

These warnings are being resolved by #10610
/Core/Common/FifoPlayer.cpp : void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct CPState’ with no trivial copy-assignment; use copy-initialization instead [-Wclass-memaccess]
/Core/VideoCommon/CPMemory.cpp : void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct CPState’ with no trivial copy-assignment; use copy-initialization instead [-Wclass-memaccess]

This warning is being resolved by #10374
/Core/Core/HW/EXI/EXI.h : 'ExpansionInterface::SLOTS’ defined but not used [-Wunused-variable]

Source/Core/Core/State.cpp Outdated Show resolved Hide resolved
Source/Core/VideoBackends/Software/Rasterizer.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Statistics.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Statistics.cpp Outdated Show resolved Hide resolved
@Minty-Meeo Minty-Meeo changed the title Resolve GCC Warnings Resolve Linux GCC Warnings May 2, 2022
@@ -55,10 +55,10 @@ struct SlopeContext
struct Slope
{
Slope() = default;
Slope(float f0, float f1, float f2, const SlopeContext& ctx) : f0(f0)
Slope(float f0_, float f1_, float f2_, const SlopeContext& ctx) : f0(f0_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it’s nicer to make the change to the internal var name instead of the name used in exposed declaration (also what Google coding standard suggests)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree, but if it makes it consistent with other code, sure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see the argument for this with private members variables, but when they're public this makes the constructor nicer at the expense of making every other access to the struct members uglier.

I believe Google's style guide agrees with me here ("Class Data Members" vs "Struct Data Members").

@Minty-Meeo
Copy link
Contributor Author

This PR is not dead btw

@Minty-Meeo Minty-Meeo force-pushed the resolve-gcc-warnings branch 2 times, most recently from 2e1f1f2 to 4984f9f Compare June 30, 2022 16:28
@Minty-Meeo
Copy link
Contributor Author

Is there anything else that needs to be done, or is this just waiting for review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants