[SERVER-20046] Coverity analysis defect 73580: Redundant test Created: 19/Aug/15  Updated: 14/Apr/16  Resolved: 19/Aug/15

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

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Test always evaluates the same

Defect 73580 (STATIC_C)
Checker DEADCODE (subcategory redundant_test)
File: /src/third_party/wiredtiger/src/reconcile/rec_write.c
Function __wt_reconcile
/src/third_party/wiredtiger/src/reconcile/rec_write.c, line: 457
At condition "scan_lock", the value of "scan_lock" must be equal to 1.

    	if (scan_lock)

/src/third_party/wiredtiger/src/reconcile/rec_write.c, line: 407
Assigning: "scan_lock" = "1".

    	scan_lock = 1;

/src/third_party/wiredtiger/src/reconcile/rec_write.c, line: 457
The condition "scan_lock" must be true.

    	if (scan_lock)



 Comments   
Comment by Keith Bostic (Inactive) [ 19/Aug/15 ]

The code was written deliberately to work this way, all of the locks get their own test variable, even though one of them isn't necessary.

Generated at Thu Feb 08 03:52:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.