Skip to content

Commit f4af051

Browse files
committed
SerialBase.cpp: fix compiler warnings by updating the initialization list
1 parent b08dc22 commit f4af051

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/source/SerialBase.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
namespace mbed {
2525

2626
SerialBase::SerialBase(PinName tx, PinName rx, int baud) :
27+
_init_func(&SerialBase::_init),
2728
#if DEVICE_SERIAL_ASYNCH
2829
_thunk_irq(this),
2930
#endif
3031
_baud(baud),
3132
_tx_pin(tx),
32-
_rx_pin(rx),
33-
_init_func(&SerialBase::_init)
33+
_rx_pin(rx)
3434
{
3535
// No lock needed in the constructor
3636

@@ -42,6 +42,7 @@ SerialBase::SerialBase(PinName tx, PinName rx, int baud) :
4242
}
4343

4444
SerialBase::SerialBase(const serial_pinmap_t &static_pinmap, int baud) :
45+
_init_func(&SerialBase::_init_direct),
4546
#if DEVICE_SERIAL_ASYNCH
4647
_thunk_irq(this), _tx_usage(DMA_USAGE_NEVER),
4748
_rx_usage(DMA_USAGE_NEVER), _tx_callback(NULL),
@@ -52,8 +53,7 @@ SerialBase::SerialBase(const serial_pinmap_t &static_pinmap, int baud) :
5253
_baud(baud),
5354
_tx_pin(static_pinmap.tx_pin),
5455
_rx_pin(static_pinmap.rx_pin),
55-
_static_pinmap(&static_pinmap),
56-
_init_func(&SerialBase::_init_direct)
56+
_static_pinmap(&static_pinmap)
5757
{
5858
// No lock needed in the constructor
5959

0 commit comments

Comments
 (0)