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

Core: Fix various warnings #9332

Merged
merged 2 commits into from Dec 20, 2020
Merged

Conversation

leoetlino
Copy link
Member

No description provided.

We want to clear/memset the padding bytes, not just each member,
so using assignment or {} initialization is not an option.

To silence the warnings, cast the object pointer to u8* (which is not
undefined behavior) to make it explicit to the compiler that we want
to fill the object representation.
Copy link
Member

@BhaaLseN BhaaLseN left a comment

Choose a reason for hiding this comment

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

Changes seem reasonable (and the remark is ignorable), untested tho.

bool ConvertRGBAToRGBAndSavePNG(const std::string& path, const u8* input, u32 width, u32 height,
int stride = 0);

std::vector<u8> RGBAToRGB(const u8* input, u32 width, u32 height, int row_stride = 0);
Copy link
Member

Choose a reason for hiding this comment

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

I don't see this being called outside of Image.cpp (at least not in this diff), but it probably doesn't matter if we leave it for others (future) use.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, the idea was that it could come in handy in the future.

@lioncash lioncash merged commit 0315ca5 into dolphin-emu:master Dec 20, 2020
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