[SERVER-28062] Coverity analysis defect 100567: Logically dead code Created: 21/Feb/17  Updated: 05/Apr/17  Resolved: 21/Feb/17

Status: Closed
Project: Core Server
Component/s: WiredTiger
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Keith Bostic (Inactive)
Resolution: Duplicate Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage 2017-03-06
Participants:

 Description   

Code can never be reached because of a logical contradiction

Defect 100567 (STATIC_C)
Checker DEADCODE (subcategory none)
File: /src/third_party/wiredtiger/src/btree/bt_split.c
Function __split_root
/src/third_party/wiredtiger/src/btree/bt_split.c, line: 665
Assigning: "complete" = "WT_ERR_IGNORE".

    	complete = WT_ERR_IGNORE;

/src/third_party/wiredtiger/src/btree/bt_split.c, line: 540
Assigning: "complete" = "WT_ERR_RETURN".

    	complete = WT_ERR_RETURN;

/src/third_party/wiredtiger/src/btree/bt_split.c, line: 686
When switching on "complete", the value of "complete" must be in one of the following intervals: {[0,0], [2,2]}.

    err:	switch (complete) {

/src/third_party/wiredtiger/src/btree/bt_split.c, line: 690
The switch value "complete" cannot be "WT_ERR_PANIC".

    	case WT_ERR_PANIC:

/src/third_party/wiredtiger/src/btree/bt_split.c, line: 690
Execution cannot reach this statement: "case WT_ERR_PANIC:".

    	case WT_ERR_PANIC:



 Comments   
Comment by Keith Bostic (Inactive) [ 21/Feb/17 ]

Duplicate of WT-3174.

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