[SERVER-79928] Coverity analysis defect 138288: Redundant test Created: 11/Aug/23  Updated: 13/Aug/23

Status: Open
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Backlog - Storage Engines Team
Resolution: Unresolved Votes: 0
Labels: code-quality, coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2023-08-11 at 09.38.24.png    
Assigned Teams:
Storage Engines
Sprint: StorEng - Defined Pipeline
Participants:
Story Points: 1

 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/third_party/wiredtiger/src/txn/txn.c:1544: DEADCODE 138288 At condition "b_has_sortable_key", the value of "b_has_sortable_key" must be equal to 0.
src/third_party/wiredtiger/src/txn/txn.c:1538: DEADCODE 138288 Condition "b_has_sortable_key", taking false branch. Now the value of "b_has_sortable_key" is equal to 0.
src/third_party/wiredtiger/src/txn/txn.c:1544: DEADCODE 138288 The condition "!b_has_sortable_key" must be true.


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