From 1be98bd7d50d8fa10b5a69987985149059bde790 Mon Sep 17 00:00:00 2001 From: Nico Date: Thu, 24 Sep 2015 12:03:55 +0200 Subject: Fix compiler warning in CDC.cpp --- cores/arduino/CDC.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cores') diff --git a/cores/arduino/CDC.cpp b/cores/arduino/CDC.cpp index 7168408..f19b44c 100644 --- a/cores/arduino/CDC.cpp +++ b/cores/arduino/CDC.cpp @@ -236,9 +236,11 @@ Serial_::operator bool() { unsigned long Serial_::baud() { // Disable interrupts while reading a multi-byte value + uint32_t baudrate; ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { - return _usbLineInfo.dwDTERate; + baudrate = _usbLineInfo.dwDTERate; } + return baudrate; } uint8_t Serial_::stopbits() { -- cgit v1.2.3-18-g5258