Refactor CMake code related to compiler warnings, enable some additional warnings#6355
Merged
SiarheiFedartsou merged 40 commits intomasterfrom Sep 30, 2022
Merged
Refactor CMake code related to compiler warnings, enable some additional warnings#6355SiarheiFedartsou merged 40 commits intomasterfrom
SiarheiFedartsou merged 40 commits intomasterfrom
Conversation
SiarheiFedartsou
commented
Sep 9, 2022
| include (CheckCCompilerFlag) | ||
|
|
||
| # Try to add -Wflag if compiler supports it | ||
| macro (add_warning flag) |
Member
Author
There was a problem hiding this comment.
SiarheiFedartsou
commented
Sep 9, 2022
| protected: | ||
| NodeIterator number_of_nodes; | ||
| EdgeIterator number_of_edges; | ||
| NodeIterator number_of_nodes = 0; |
Member
Author
There was a problem hiding this comment.
We had maybe-uninitialized disabled, not sure if there was really problem here, but looks suspicious.
mjjbell
approved these changes
Sep 29, 2022
src/util/glibc_workaround.cpp
Outdated
| // This is needed because libstdc++ itself uses this API - its not | ||
| // just an issue of your code using it, ughhh | ||
|
|
||
| #pragma GCC diagnostic push |
Member
There was a problem hiding this comment.
We can probably remove this whole file.
We're not supporting GCC versions this old anymore.
| add_warning(logical-op) | ||
| add_warning(maybe-uninitialized) | ||
| add_warning(misleading-indentation) | ||
| add_warning(no-return-local-addr) |
Member
Author
There was a problem hiding this comment.
It is confusing :) no- prefix is part of warning name, i.e. it doesn't mean we are disabling it, I'll add a comment
mattwigway
pushed a commit
to mattwigway/osrm-backend
that referenced
this pull request
Jul 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Doesn't fix anything really important, but allows to better control warnings in the future.
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?