[SERVER-54282] -Wunused-result shouldn't ignore --disable-warnings-as-errors Created: 04/Feb/21 Updated: 29/Oct/23 Resolved: 19/Feb/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Ryan Egesdahl (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Dev Platform 2021-02-22 |
| Participants: |
| Description |
|
We are currently forcing clang builds (and only clang builds) to use -Werror=unused-result (https://github.com/mongodb/mongo/blob/master/SConstruct#L2388-L2389) which ignores the --disable-warnings-as-errors. I always generate my compile_commands.json with that flag so that my editor shows errors and warnings differently. |
| Comments |
| Comment by Githook User [ 19/Feb/21 ] |
|
Author: {'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}Message: We should not make any compiler warnings cause errors if |
| Comment by Andrew Morrow (Inactive) [ 04/Feb/21 ] |
|
Yeah, I agree it should be conditioned on the state of --disable-warnings-as-errors. |