[SERVER-20114] Coverity analysis defect 72818: Unchecked return value Created: 25/Aug/15  Updated: 14/Apr/16  Resolved: 18/Sep/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: Adam Midvidy
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Platform 9 (09/18/15)
Participants:

 Description   

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

Defect 72818 (STATIC_C)
Checker CHECKED_RETURN (subcategory none)
File: /src/mongo/client/replica_set_monitor.cpp
Function mongo::<unnamed>::ReplicaSetMonitorWatcher::run()
/src/mongo/client/replica_set_monitor.cpp, line: 130
Calling "wait_for" without checking return value (as is done elsewhere 7 out of 10 times).

                _stopRequestedCV.wait_for(sl, stdx::chrono::seconds(10));

File: /src/mongo/client/replica_set_monitor.cpp
Function mongo::<unnamed>::ReplicaSetMonitorWatcher::run()
/src/mongo/client/replica_set_monitor.cpp, line: 154
Calling "wait_for" without checking return value (as is done elsewhere 7 out of 10 times).

                _stopRequestedCV.wait_for(sl, stdx::chrono::seconds(10));



 Comments   
Comment by Adam Midvidy [ 18/Sep/15 ]

_stopRequested will be rechecked so there is no harm in not checking the return value

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