[SERVER-33654] Coverity analysis defect 103374: Uninitialized scalar variable Created: 05/Mar/18  Updated: 29/Oct/23  Resolved: 26/Mar/18

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Jonathan Reams
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2018-03-26
Participants:

 Description   

Use of an uninitialized variable

Defect 103374 (STATIC_C)
Checker UNINIT (subcategory none)
File: /src/mongo/transport/asio_utils.h
Function mongo::transport::pollASIOSocket<asio::basic_stream_socket<asio::generic::stream_protocol>, int>(T1 &, T2, mongo::Duration<std::ratio<(long)1, (long)1000>>)
/src/mongo/transport/asio_utils.h, line: 131
Declaring variable "pollItem" without initializer.

        pollfd pollItem;

/src/mongo/transport/asio_utils.h, line: 158
Using uninitialized value "pollItem.revents".

        int revents = pollItem.revents;



 Comments   
Comment by Githook User [ 26/Mar/18 ]

Author:

{'email': 'jbreams@mongodb.com', 'name': 'Jonathan Reams', 'username': 'jbreams'}

Message: SERVER-33654 Make sure pollfd has an initializer
Branch: master
https://github.com/mongodb/mongo/commit/9b6bcfd63f9413caaa2fdd12e9dedb712ca66913

Generated at Thu Feb 08 04:34:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.