Skip to content

Commit 24cb033

Browse files
committed
esp8266-driver: fix variables init in constructor.
Fixes Coverity issue about not initialized members.
1 parent f513bce commit 24cb033

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/wifi/esp8266-driver/ESP8266Interface.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ ESP8266Interface::ESP8266Interface()
6767
_if_connected(_cmutex),
6868
_initialized(false),
6969
_connect_retval(NSAPI_ERROR_OK),
70+
_disconnect_retval(NSAPI_ERROR_OK),
7071
_conn_stat(NSAPI_STATUS_DISCONNECTED),
7172
_conn_stat_cb(NULL),
7273
_global_event_queue(mbed_event_queue()), // Needs to be set before attaching event() to SIGIO
7374
_oob_event_id(0),
7475
_connect_event_id(0),
76+
_disconnect_event_id(0),
7577
_software_conn_stat(IFACE_STATUS_DISCONNECTED)
7678
{
7779
memset(_cbs, 0, sizeof(_cbs));
@@ -104,11 +106,14 @@ ESP8266Interface::ESP8266Interface(PinName tx, PinName rx, bool debug, PinName r
104106
_if_connected(_cmutex),
105107
_initialized(false),
106108
_connect_retval(NSAPI_ERROR_OK),
109+
_disconnect_retval(NSAPI_ERROR_OK),
107110
_conn_stat(NSAPI_STATUS_DISCONNECTED),
108111
_conn_stat_cb(NULL),
109112
_global_event_queue(mbed_event_queue()), // Needs to be set before attaching event() to SIGIO
110113
_oob_event_id(0),
111-
_connect_event_id(0)
114+
_connect_event_id(0),
115+
_disconnect_event_id(0),
116+
_software_conn_stat(IFACE_STATUS_DISCONNECTED)
112117
{
113118
memset(_cbs, 0, sizeof(_cbs));
114119
memset(ap_ssid, 0, sizeof(ap_ssid));

0 commit comments

Comments
 (0)