[SERVER-23183] Coverity analysis defect 98172: Logically dead code Created: 16/Mar/16  Updated: 14/Apr/16  Resolved: 18/Mar/16

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 3.3.3
Fix Version/s: 3.3.4

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Robert Guo (Inactive)
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-22900 The validate command's per index info... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: TIG 12 (04/01/16)
Participants:

 Description   

Code can never be reached because of a logical contradiction

Defect 98172 (STATIC_C)
Checker DEADCODE (subcategory none)
File: /src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
Function mongo::WiredTigerIndex::fullValidate(mongo::OperationContext *, bool, long long *, mongo::ValidateResults *) const
/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp, line: 269
Condition "fullResults", taking true branch. Now the value of "fullResults" is not "NULL".

        if (fullResults && !WiredTigerRecoveryUnit::get(txn)->getSessionCache()->isEphemeral()) {

/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp, line: 271
At condition "fullResults", the value of "fullResults" cannot be "NULL".

                WiredTigerUtil::verifyTable(txn, _uri, fullResults ? &(fullResults->errors) : NULL);

/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp, line: 270
The condition "fullResults" must be true.

            int err =

/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp, line: 270
Execution cannot reach the expression "NULL" inside this statement: "err = mongo::WiredTigerUtil...".

            int err =



 Comments   
Comment by Githook User [ 18/Mar/16 ]

Author:

{u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robert.guo@10gen.com'}

Message: SERVER-23183 remove redundant NULL check in WiredTigerIndex::fullValidate
Branch: master
https://github.com/mongodb/mongo/commit/2857d765abe95308b176242d6a9c7442064fd051

Generated at Thu Feb 08 04:02:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.