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

Re-enable disabled GCC warnings where possible #7379

Merged
merged 3 commits into from
Jul 21, 2024

Conversation

DomClark
Copy link
Member

This PR removes all -Wno-<warning> flags that are unnecessary, or for which the code is fixable. The only one left is -Wno-array-bounds, which triggers false positives with sufficient optimisations enabled - see the comment in the code for more information. I added -Wno-stringop-overread to this, which suffers from the same problems, for GCC versions 11 and above (required to build with -Werror on my machine). I removed -Werror=unused-function since -Wunused-function is included in -Wall, and I see no reason to have it be an error even without -Werror.

Most of the code changes are fixes for the reintroduced -Wsign-compare. I originally planned to introduce -Wextra along with these changes, but there turned out to be enough already for their own PR. There may be one or two extraneous -Wextra fixes in here that I didn't split out correctly, but they're still worth including. Other notable changes include an alternative to the old deprecated FluidSynth effect API (again, required to build with -Werror on my machine), and a fix for SID hanging since #7363 (I caught this bug via a compiler warning prior to someone mentioning it on Discord, highlighting the utility of these warnings).

Copy link
Contributor

@Rossmaxx Rossmaxx left a comment

Choose a reason for hiding this comment

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

Here's my thoughts. Some of this may be stupid. Excuse those.

include/AudioPortAudio.h Show resolved Hide resolved
include/RemotePlugin.h Show resolved Hide resolved
include/RmsHelper.h Show resolved Hide resolved
include/Track.h Show resolved Hide resolved
plugins/Bitcrush/Bitcrush.cpp Show resolved Hide resolved
plugins/ReverbSC/base.c Show resolved Hide resolved
plugins/VstBase/RemoteVstPlugin.cpp Show resolved Hide resolved
@DomClark DomClark mentioned this pull request Jul 18, 2024
@DomClark DomClark merged commit 851c884 into LMMS:master Jul 21, 2024
10 checks passed
@DomClark DomClark deleted the gcc-reenable-warnings branch July 21, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants