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

Remove unused variables #247

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

qmfrederik
Copy link
Contributor

Suppresses a couple of build warnings (-Wunused-but-set-variable)

@qmfrederik qmfrederik requested a review from fredkiefer as a code owner March 31, 2024 21:39
}*/

last_p = g->pos = p;
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure whether the setting of g->pos that got removed here is really not needed. If so, could you please explain why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, this was too greedy on my side.

@fredkiefer
Copy link
Member

I am fine with removing the unused variable from the second file.. In the first file things are different. Actually it would be great if we did use this variable and if the commented out code would be active. So instead of removing this variable we should try to get this code faster and reenable it again.

Fixes a compiler warnings
@qmfrederik qmfrederik force-pushed the warnings-unused-variable branch from 3c9792a to b3038e3 Compare April 1, 2024 18:39
@qmfrederik
Copy link
Contributor Author

@fredkiefer Thanks for reviewing this. I reduced the scope of this patch to focus on the first file only. You are probably right and the proper fix is to re-enable the commented out code, but that's a bit beyond the mindset of "let's see if there's low hanging fruit to reduce compiler warnings" I had when I opened these PRs.

@fredkiefer fredkiefer merged commit 4470a15 into gnustep:master Apr 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants