diff --git a/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp b/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp index 0621eecd4e09df..7521d53e3fcd6c 100644 --- a/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp @@ -379,7 +379,7 @@ void LinuxWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * cal size_t LinuxWiFiDriver::WiFiNetworkIterator::Count() { - size_t count; + size_t count = 0; for (int networkIndex = 0; networkIndex < kMaxNetworks; networkIndex++) { if(!driver->mStagingNetwork[networkIndex].Empty())