[SERVER-70886] Coverity analysis defect 134024: Redundant test Created: 27/Oct/22  Updated: 29/Oct/23  Resolved: 16/Dec/22

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

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

Issue Links:
Related
related to SERVER-70809 Simplify logic in timeseries options Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2022-12-12, Execution Team 2022-12-26
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/timeseries/timeseries_options.cpp:141: DEADCODE 134024 At condition "allowSecondsParameters", the value of "allowSecondsParameters" must be equal to 1.
/src/mongo/db/timeseries/timeseries_options.cpp:134: DEADCODE 134024 Condition "allowSecondsParameters", taking true branch. Now the value of "allowSecondsParameters" is equal to 1.
/src/mongo/db/timeseries/timeseries_options.cpp:141: DEADCODE 134024 The condition "allowSecondsParameters" must be true.


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