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

Marking unused code #4661

Merged
merged 2 commits into from Mar 26, 2024
Merged

Conversation

cvvergara
Copy link
Contributor

Issue

What issue is this PR targeting? If there is no issue that addresses the problem, please open a corresponding issue and link it here.

Tasklist

  • fixing test warnings
  • Add tests
  • Add #fixes with the issue number that this PR addresses
  • Update the docs with any new request parameters or changes to behavior described
  • Update the changelog
  • If you made changes to the lua files, update the taginfo too.

Requirements / Relations

Link any requirements here. Other pull requests this PR is based on?

// the roundabout.", "Enter the
// roundabout.", "Enter the
// roundabout.", "");
#if 0
Copy link
Member

@nilsnolde nilsnolde Mar 26, 2024

Choose a reason for hiding this comment

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

was that a "multiline comment" warning? I always wondered why that would be a compiler warning.. to me, it's kinda a case in point that we shouldn't use -WAll/Extra at all and instead choose the few compiler warnings we actually want to care about. there's many very good ones, but this isn't one of them IMHO.

that would also solve the annoying thing where we semi-regularly break the -WAll CI builds because some compiler update introduced some esoteric new warning which we then have to comply with.

it's just unfortunately a serious PITA to write out all interesting warnings.. on top of that clang & gcc here and there have different names for the same warning! thanks for that..

so yeah, in summary, I just wanna express how much I loathe these nonsense warnings 😄 I do understand why you do if 0 (easy to grep, won't be compiled) and it makes sense here instead of removing it seems, reading the comment. I still hope that we don't have to do those changes too much

Copy link
Member

Choose a reason for hiding this comment

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

my two cents: i hate this convention 😄

there is nothing wrong with commenting something out. if the compiler is warning about this then as nils said we have it configured wrong. this is just way way too pedantic to be reasonable. can we avoid doing more of this?

if we desperately want to use the preprocessor to disable this code we should define a macro for tests to use like NON_WORKING_TEST_CODE or something. the idea with these things are kind of like the author leaving a sketch of something that is TODOs but isnt ready yet. having ifdef 0 looks more like stuff you leave around while developing but want to actually delete before you PR the change

@nilsnolde nilsnolde merged commit 0a36ae1 into valhalla:master Mar 26, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants