Add common GCC/clang -W flags for better diagnostics#4495
Conversation
Basic set of -W flags to get people annoyed and perhaps kill a bunch of potential bug-like issues along.
There was a problem hiding this comment.
Switching on warnings is not enough, i would suggest to switch on a single warning per commit and fix all corresponding warning messages to have always 0 visible warnings.
I know it was never done for MSVC, but for clang/gcc switching on multiple warnings will make non-IDE (emacs 😎) development really hard. Also many warnings like Wshadow are produced for the current coding style. So at first a decision about warnings policy must be made and it could make the PR a long-living beast.
|
@oxidase Yes. I should make it clear it's WIP and not ready yet to merge. Updated to PR Tasklist. Also, the large warnings flood makes CI build logs too large.
Although this is beyond jurisdiction :) I'd appreciate any update on that, so I know how to proceed with this PR.
I have no problem with that. I can keep the fix-rebase-fix-rebase cycle until it is satisfactory. Unless, it is preferred to drop it now, feel free then. |
|
@mloskot no worries, this PR is in right direction. One thing to mention is that some warnings can be in third-party libraries like Boost. So before reviewing warnings it is better to classify all new warnings and decide whether fix/suppress warnings in OSRM or fix in libraries upstreams. |
|
Superseded by #4843 |
WIP: not ready to merge
Issue
Basic set of -W flags to get people annoyed and perhaps kill a bunch of potential bug-like issues along.
Tasklist
Requirements / Relations
[OSRM-talk] Compiler warnings policy