Merge pull request #6611 from pauluap/compiler_warning_UARTSerial

Uninitialized variable warning in UARTSerial at -O3
pull/6537/merge
Cruz Monrreal 2018-04-23 11:01:49 -05:00 committed by GitHub
commit f372bcb69b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -305,12 +305,11 @@ void UARTSerial::rx_irq(void)
void UARTSerial::tx_irq(void)
{
bool was_full = _txbuf.full();
char data;
/* Write to the peripheral if there is something to write
* and if the peripheral is available to write. */
while (!_txbuf.empty() && SerialBase::writeable()) {
char data;
_txbuf.pop(data);
while (SerialBase::writeable() && _txbuf.pop(data)) {
SerialBase::_base_putc(data);
}