[SERVER-18865] Coverity analysis defect 72739: Unchecked return value Created: 08/Jun/15  Updated: 14/Apr/16  Resolved: 08/Jun/15

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Benety Goh
Resolution: Won't Fix 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   

Value returned from a function is not checked for errors before being used

Defect 72739 (STATIC_C)
Checker CHECKED_RETURN (subcategory none)
File: /src/mongo/db/repl/data_replicator.cpp
Function mongo::repl::DataReplicator::_onOplogFetchFinish(const mongo::StatusWith<mongo::repl::Fetcher::BatchData> &, mongo::repl::Fetcher::NextAction *)
/src/mongo/db/repl/data_replicator.cpp, line: 1357
Calling "setFollowerMode" without checking return value (as is done elsewhere 7 out of 8 times).

                            _replCoord->setFollowerMode(MemberState::RS_RECOVERING); // TODO too stale


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