[SERVER-68667] Coverity analysis defect 128599: Redundant test Created: 09/Aug/22  Updated: 27/Oct/23  Resolved: 09/Aug/22

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: Eric Milkie
Resolution: Works as Designed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Redundant test

By the time the program execution reaches the test of this condition there is only one possible outcome for the test. The code at the destination of this branch is not dead, either because this condition is always true or because there is at least one other branch that reaches it. Test always evaluates the same
/src/mongo/db/s/sharding_util.cpp:222: DEADCODE 128599 At condition "unique", the value of "unique" must be equal to 1.
/src/mongo/db/s/sharding_util.cpp:218: DEADCODE 128599 Assigning: "unique" = "true".
/src/mongo/db/s/sharding_util.cpp:219: DEADCODE 128599 The condition "!unique" cannot be true.


Generated at Thu Feb 08 06:11:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.