-
-
Notifications
You must be signed in to change notification settings - Fork 781
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 GCC warnings #1679
Fix GCC warnings #1679
Conversation
We're unsure which GCC you're building with and what extra options you might be specifying, but if you could please let us know that extra information it would help us review this proposed change set. That's because even with GCC 13 on our Arch systems, we do not get any warnings (turned into errors) so this raises some interesting questions. Aside from that, please could you rework your commit messages to comply with the contribution guidelines. We'll endeavour to do a proper review as soon as we can once we have the requested extra information. |
d209f40
to
0a6d342
Compare
I changed the commit messages to start with You are right, I should have specified the build settings. I am not using the BMP build system directly, but my own I am on Indeed, it is not Especially |
0a6d342
to
b5172e2
Compare
Having it as a We'll have a think about that particular warning and the resulting code changes and get back to you though as it might be some of the changes actually migrate to the build system (setting We would recommend adding to your build options This all links up with issue #1590 which gives an overview of the progress that's being made toward a much stricter set of warnings (and because of -Werror, errors) being enabled to cover the multitude of crimes and bugs the compiler is able to pick up on and tell us about. |
Since you mention In some places, it is checked for with |
Aye, the result of many hands over many years all doing things slightly differently. In principal, |
As I understood it:
I can adjust this PR accordingly, and refactor the use of |
Correct
We need to think on it, it might be that actually it makes a lot of sense to stop the current ENABLE_DEBUG mess from reoccurring - but it's late here, so we want to do that thinking after we've had sleep.
It is of interest, and that's actually why we didn't say anything about it - there's nothing contentious there.
If you could particularly deal with the ENABLE_DEBUG consistency, that would be a much appreciated contribution in addition to the strict prototypes bit. We'll ping a message on this PR in the morning once we've had a deep think on |
Great, looking forward to it! |
b5172e2
to
9b9bdfb
Compare
Sorry it's taken a bit more than one day to get back to you on this. Having thought on the subject of -Wundef, what we're going to suggest is that: macro usage triggering the warning should be fixed, but by fixing the build system to be more consistent rather than fixing the code to check for the macros being defined. Our thinking is this: If the macros in question are always defined to either 0 or 1, it makes the checks they're involved in not only simpler but more robust for contributors to get right. It allows the project to be perfectly consistent. Our other ask is that the -Wundef related changes go in a separate commit to the strict prototypes fixes - this way if something is wrong or has to be revisited we can more effectively |
No worries. I will make the changes in the next few days, so they can be reviewed. |
Checking back in with this as it's been a couple of weeks - it'd be nice to get this merged as we've hit some of the warnings this fixes over on the Meson feature PR. |
Ok, I have not gotten around to it yet. I will prioritize it. |
9b9bdfb
to
c7ee563
Compare
I think it's done. Let me know what you think. |
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 is looking considerably better. While there are several review items, they're mostly targeting the same one issue (excessive use of parens where they can be dropped and avoided) that should be quite an easy (fast) fix. Once these have been addressed, we'll be happy to merge.
always set ADVERTISE_NOACKMODE (0 or 1)
2d6f655
to
054499a
Compare
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.
LGTM, merging once the CI builds complete. Thank you for the contribution! It's greatly appreciated 😄
Great, thanks for merging! 🥳 |
Detailed description
I build with GCC's
-Werror
, so I needed to fix a few warnings.#define
d, before checking their valuevoid
argument)NO_LIBOPENCM3
check, when aiming to disable compilation of the libraryYour checklist for this pull request
make PROBE_HOST=native
)make PROBE_HOST=hosted
)