[SERVER-68666] Coverity analysis defect 128602: Redundant test Created: 09/Aug/22  Updated: 29/Oct/23  Resolved: 10/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2022-08-22
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/catalog/index_catalog_impl.cpp:1368: DEADCODE 128602 Condition "entry.operator bool()", taking true branch. Now the value of "entry" is not "nullptr".
/src/mongo/db/catalog/index_catalog_impl.cpp:1368: DEADCODE 128602 At condition "entry.operator bool()", the value of "entry" cannot be "nullptr".
/src/mongo/db/catalog/index_catalog_impl.cpp:1368: DEADCODE 128602 The condition "entry.operator bool()" must be true.



 Comments   
Comment by Githook User [ 10/Aug/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-68666 Remove redundant check in IndexCatalogImpl::_deleteIndexFromDisk()
Branch: master
https://github.com/mongodb/mongo/commit/1ad5ef42f5161542550262647ab79e85cc6a7cf2

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