SerialBase.cpp: fix compiler warnings by updating the initialization list

pull/12282/head
Przemyslaw Stekiel 2020-01-20 11:03:51 +01:00
parent b08dc22e27
commit f4af0516f4
1 changed files with 4 additions and 4 deletions

View File

@ -24,13 +24,13 @@
namespace mbed {
SerialBase::SerialBase(PinName tx, PinName rx, int baud) :
_init_func(&SerialBase::_init),
#if DEVICE_SERIAL_ASYNCH
_thunk_irq(this),
#endif
_baud(baud),
_tx_pin(tx),
_rx_pin(rx),
_init_func(&SerialBase::_init)
_rx_pin(rx)
{
// No lock needed in the constructor
@ -42,6 +42,7 @@ SerialBase::SerialBase(PinName tx, PinName rx, int baud) :
}
SerialBase::SerialBase(const serial_pinmap_t &static_pinmap, int baud) :
_init_func(&SerialBase::_init_direct),
#if DEVICE_SERIAL_ASYNCH
_thunk_irq(this), _tx_usage(DMA_USAGE_NEVER),
_rx_usage(DMA_USAGE_NEVER), _tx_callback(NULL),
@ -52,8 +53,7 @@ SerialBase::SerialBase(const serial_pinmap_t &static_pinmap, int baud) :
_baud(baud),
_tx_pin(static_pinmap.tx_pin),
_rx_pin(static_pinmap.rx_pin),
_static_pinmap(&static_pinmap),
_init_func(&SerialBase::_init_direct)
_static_pinmap(&static_pinmap)
{
// No lock needed in the constructor