From e609c78f20396413695cc48abf1dad60597316be Mon Sep 17 00:00:00 2001 From: Jamie Parkinson Date: Mon, 26 Nov 2018 23:22:37 +0100 Subject: [PATCH] Initialize detectedBaudRate to prevent compilation errors (#2101) --- cores/esp32/HardwareSerial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp32/HardwareSerial.cpp b/cores/esp32/HardwareSerial.cpp index 0ad44258..fb6300f1 100644 --- a/cores/esp32/HardwareSerial.cpp +++ b/cores/esp32/HardwareSerial.cpp @@ -56,7 +56,7 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in if(!baud) { time_t startMillis = millis(); - unsigned long detectedBaudRate; + unsigned long detectedBaudRate = 0; while(millis() - startMillis < timeout_ms && !(detectedBaudRate = uartDetectBaudrate(_uart))) { yield(); }