[SERVER-58874] Coverity analysis defect 120344: Operands don't affect result Created: 27/Jul/21 Updated: 27/Oct/23 Resolved: 25/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Coverity Collector User | Assignee: | Mindaugas Malinauskas |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | coverity | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Sprint: | QE 2021-08-09, QE 2021-08-23, QE 2021-09-06 | ||||||||
| Participants: | |||||||||
| Description |
|
Operands don't affect result The expression's value does not depend on the operands; often, this represents an inadvertent logic error. An operation with non-constant operands that computes a result with constant value |
| Comments |
| Comment by Mindaugas Malinauskas [ 25/Aug/21 ] |
|
It is a false positive. The tool does not "see" that if T== long long, the marked line is not reachable since the function returns above that line. Marked as False Positive in Coverity. |
| Comment by Kyle Suarez [ 28/Jul/21 ] |
|
mindaugas.malinauskas, it looks like the tryCoerce() function was most recently changed by your work in |