[SERVER-29887] clang-4.0 warns about std::max(0u, variable) in geo code Created: 28/Jun/17 Updated: 30/Oct/23 Resolved: 26/Jul/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.11 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Mathias Stearn |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Repl 2017-07-31 |
| Participants: |
| Description |
|
This looks real, since that is almost certainly not what that code is actually trying to do:
|
| Comments |
| Comment by Githook User [ 26/Jul/17 ] |
|
Author: {'email': 'mathias@10gen.com', 'username': 'RedBeard0531', 'name': 'Mathias Stearn'}Message: |
| Comment by Githook User [ 14/Jul/17 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: Revert " This reverts commit 8204c7dacf17851057dda165e6d1638cbff70cbf. |
| Comment by Githook User [ 13/Jul/17 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: |
| Comment by David Storch [ 30/Jun/17 ] |
|
This is not a priority for the query team right now, but I'd be happy to review a patch. This code has been there for quite some time, and I'm not super familiar with it, but it did look like we could just remove the extra std::max() calls. |
| Comment by Mathias Stearn [ 30/Jun/17 ] |
|
Can we get this in 3.5 required or at least desired? We generally try to ensure that our code is warning free on the latest compilers at the time of release to make it easier to work with over its full supported lifetime (in addition to the obvious correctness benefits). |