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

Removes warnings generated by GDCLASS usage #1545

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

Klaim
Copy link
Contributor

@Klaim Klaim commented Aug 8, 2024

This change removes the warnings (unused parameters) coming from code injected by the GDCLASS macro.

Contrary to warnings coming from the normal source code which can be suppressed with most compiles by specifying the include directories of this library as external or system, when the code is injected through a macro it is considered in the context of the user, which is the source code of user of the library.

That forces the users to modify their code to hide the warnings coming from the mandatory GDCLASS here. That's why it's important to remove these warning from that specific macro and ideally any other macro that the user must use.

Fixes #1541

I tested it in my project and in an isolated example.

@Klaim Klaim requested a review from a team as a code owner August 8, 2024 00:27
@Klaim Klaim marked this pull request as draft August 8, 2024 00:39
This change removes the warnings (unused parameters) coming from code injected by the GDCLASS macro.
Contrary to warnings coming from the normal source code which can be suppressed with most compiles by specifying the include directories of this library as external or system,
when the code is injected through a macro it is considered in the context of the user, which is the source code of user of the library.
That forces the users to modify their code to hide the warnings coming from the mandatory `GDCLASS` here.
That's why it's important to remove these warning from that specific macro and ideally any other macro that the user must use.
@Klaim Klaim marked this pull request as ready for review August 8, 2024 01:24
@AThousandShips AThousandShips added the topic:buildsystem Related to the buildsystem or CI setup label Aug 8, 2024
@AThousandShips AThousandShips changed the title Removes warnings generated by GDCLASS usage (fixes #1541) Removes warnings generated by GDCLASS usage Aug 8, 2024
@dsnopek dsnopek added this to the 4.x milestone Aug 8, 2024
@dsnopek dsnopek added enhancement This is an enhancement on the current functionality cherrypick:4.1 cherrypick:4.2 labels Aug 8, 2024
Copy link
Collaborator

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

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

Thanks! This looks good to me

@dsnopek dsnopek merged commit 937b1d8 into godotengine:master Aug 8, 2024
12 checks passed
@dsnopek
Copy link
Collaborator

dsnopek commented Sep 3, 2024

Cherry-picked for 4.2 in PR #1570

@dsnopek
Copy link
Collaborator

dsnopek commented Sep 4, 2024

Cherry-picked for 4.1 in PR #1572

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unreferenced named parameters warnings from GDCLASS macro usage
3 participants