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: Remove unnessary reference to suppress warning #8337

Merged
merged 1 commit into from Dec 15, 2020
Merged

Fix: Remove unnessary reference to suppress warning #8337

merged 1 commit into from Dec 15, 2020

Conversation

bc-lee
Copy link
Contributor

@bc-lee bc-lee commented Nov 7, 2020

Apple Clang version 12 (bundled with Xcode 12) complaints about copying
small objects in range loop (-Wrange-loop-analysis introduced by -Wall).
This warning can be easily avoided by removing the reference from
the const pointer type.

@LordAro
Copy link
Member

LordAro commented Dec 2, 2020

To be honest, I feel like removing the reference is the better solution here. Taking a reference of a const pointer is fairly ...pointless

@TrueBrain
Copy link
Member

@bc-lee : would you feel up for this? Instead of suppressing the warning, fixing the cause? Would be really awesome if you can fix it :) It is annoying the hell out of me on every CI run :P

@TrueBrain TrueBrain added waiting on author candidate: probably not This Pull Request will most likely be closed soon size: trivial This Pull Request is trivial OS: MacOS This issue is related to a Mac OS problem candidate: yes This Pull Request is a candidate for being merged work: needs more work This Pull Request needs more work before it can be accepted and removed waiting on author candidate: probably not This Pull Request will most likely be closed soon labels Dec 14, 2020
Apple Clang version 12 (bundled with Xcode 12) complaints about copying
small objects in range loop (-Wrange-loop-analysis introduced by -Wall).
This warning can be easily avoided by removing the reference from
the const pointer type.
@TrueBrain TrueBrain added needs review and removed work: needs more work This Pull Request needs more work before it can be accepted labels Dec 15, 2020
@bc-lee bc-lee changed the title Fix: Suppress unnecessary warnings introduced in Xcode 12 Fix: Remove unnessary reference to suppress warning Dec 15, 2020
@bc-lee
Copy link
Contributor Author

bc-lee commented Dec 15, 2020

@TrueBrain It turns out, fixing this without side effects is almost trivial, so I did it. PTAL.

@TrueBrain TrueBrain merged commit 0471de2 into OpenTTD:master Dec 15, 2020
@TrueBrain
Copy link
Member

Thank you very much, also for the quick reply/fix :D Awesome!

@bc-lee bc-lee deleted the feature/suppress-warnin-xcode-12 branch December 16, 2020 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
candidate: yes This Pull Request is a candidate for being merged needs review OS: MacOS This issue is related to a Mac OS problem size: trivial This Pull Request is trivial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants