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 compiler warnings, bump deps etc. #3318

Merged
merged 15 commits into from
Jan 13, 2025
Merged

Conversation

Ghabry
Copy link
Member

@Ghabry Ghabry commented Dec 23, 2024

My final contribution before Christmas to get rid of all compiler warnings reported by g++ and clang with Wall, extra, deprecated.

Can be already reviewed, except:

Unfortunately: This is not ready yet because the unit tests that calculate the attack damage fail. The reason is that the tests never executed because SUBCASEs inside a for-loop only executed once. Now they run and fail 🤷 .

I think the code itself is correct, just the tests are flawed and nobody noticed as they didn't execute. But fixing this is a bit more involved.

@Ghabry Ghabry added this to the 0.8.1 milestone Dec 23, 2024
@github-actions github-actions bot added Window/Scenes FileFinder Audio Battle Wii 3DS PSVita Switch libretro Libretro port related, including RetroArch, RetroPie and related projects Tests MIDI labels Dec 23, 2024
@Ghabry
Copy link
Member Author

Ghabry commented Dec 23, 2024

correction: The PR labeler works. So many colourful labels 😆

@Ghabry Ghabry removed Window/Scenes FileFinder Audio Battle Wii 3DS PSVita Switch libretro Libretro port related, including RetroArch, RetroPie and related projects MIDI labels Dec 23, 2024
@github-actions github-actions bot added Audio Battle Wii 3DS PSVita Switch libretro Libretro port related, including RetroArch, RetroPie and related projects MIDI labels Jan 8, 2025
@fdelapena fdelapena removed Android Window/Scenes FileFinder Audio Battle Wii 3DS PSVita Switch MIDI libretro Libretro port related, including RetroArch, RetroPie and related projects labels Jan 8, 2025
@Ghabry
Copy link
Member Author

Ghabry commented Jan 8, 2025

uhm will also disable the sanitizers for now. looks like the leak sanitizer makes the check fail...

@Ghabry Ghabry force-pushed the cleanup branch 2 times, most recently from 5eb18da to 7d78303 Compare January 8, 2025 21:46
@@ -62,9 +62,12 @@ Game_BattleAlgorithm::AlgorithmBase::AlgorithmBase(Type ty, Game_Battler* source
type(ty), source(source), targets(std::move(in_targets))
{
assert(source != nullptr);

#ifndef NDEBUG
Copy link
Member

Choose a reason for hiding this comment

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

Does it nag about an empty loop here?
Because asserts are no-ops in release builds anyway, so should be optimized away.

Copy link
Member Author

Choose a reason for hiding this comment

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

It nags about the unused t loop var when the assert is removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Found a better solution involving assert(std::none_of(...)).

@Ghabry
Copy link
Member Author

Ghabry commented Jan 10, 2025

good news: Can reenable the sanitizers. The reported memory leak was a real leak (I assumed its a false positive because of some static buffers in liblcf).

The destiny testcase used new for memory management. 🤔

@fdelapena fdelapena merged commit d6ff81f into EasyRPG:master Jan 13, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants