[SERVER-60616] Coverity analysis defect 120880: Unsigned compared against 0 Created: 12/Oct/21 Updated: 29/Oct/23 Resolved: 20/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.1.0-rc0 |
| Fix Version/s: | 5.2.0, 5.1.1 |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Coverity Collector User | Assignee: | Neil Shweky (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | coverity, neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v5.1
|
||||||||||||
| Sprint: | QE 2021-11-01 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Unsigned compared against 0 An unsigned value can never be negative, so this test will always evaluate the same way. An unsigned value can never be less than 0 |
| Comments |
| Comment by Kyle Suarez [ 09/Nov/21 ] | |
|
This is in both 5.2.0 as well as 5.1.1, so adding back the 5.2.0 fixVersion. CC neil.shweky | |
| Comment by Githook User [ 08/Nov/21 ] | |
|
Author: {'name': 'Neil Shweky', 'email': 'neilshweky@gmail.com', 'username': 'Neilshweky'}Message: (cherry picked from commit 1c805a82af30bbc7b47bdbdf03b50c2ac3005c31) | |
| Comment by Githook User [ 20/Oct/21 ] | |
|
Author: {'name': 'Neil Shweky', 'email': 'neilshweky@gmail.com', 'username': 'Neilshweky'}Message: | |
| Comment by Kyle Suarez [ 12/Oct/21 ] | |
|
The hash builtin SBE function is using an arity checker function that has no effect because it will always be true. We have a kAnyNumberOfArgs function that can be used to trivially accept any number of arguments, used like so:
|