[SERVER-18497] Coverity analysis defect 72681: Unchecked return value Created: 15/May/15  Updated: 18/May/15  Resolved: 18/May/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: Andy Schwerin
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

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

Defect 72681 (STATIC_C)
Checker CHECKED_RETURN (subcategory none)
File: /src/mongo/util/time_support.cpp
Function mongo::<unnamed>::_dateToISOString(mongo::Date_t, bool, mongo::<unnamed>::DateStringBuffer *)
/src/mongo/util/time_support.cpp, line: 232
Calling "strftime" without checking return value (as is done elsewhere 3 out of 4 times).

                strftime(cur, bufRemaining, "%z", &t);



 Comments   
Comment by Andy Schwerin [ 18/May/15 ]

stftime only returns 5 in this call, there's no point to checking its return value.

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