Skip to content

SerialBase.h|cpp [-Wreorder] compiler warning fix #11839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions drivers/SerialBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,26 +329,26 @@ class SerialBase : private NonCopyable<SerialBase> {

#if DEVICE_SERIAL_ASYNCH
CThunk<SerialBase> _thunk_irq;
DMAUsage _tx_usage;
DMAUsage _rx_usage;
DMAUsage _tx_usage = DMA_USAGE_NEVER;
DMAUsage _rx_usage = DMA_USAGE_NEVER;
event_callback_t _tx_callback;
event_callback_t _rx_callback;
bool _tx_asynch_set;
bool _rx_asynch_set;
bool _tx_asynch_set = false;
bool _rx_asynch_set = false;
#endif

serial_t _serial;
serial_t _serial {};
Callback<void()> _irq[IrqCnt];
int _baud;
bool _rx_enabled;
bool _tx_enabled;
bool _rx_enabled = true;
bool _tx_enabled = true;
const PinName _tx_pin;
const PinName _rx_pin;

#if DEVICE_SERIAL_FC
Flow _flow_type;
PinName _flow1;
PinName _flow2;
Flow _flow_type = Disabled;
PinName _flow1 = NC;
PinName _flow2 = NC;
#endif

#endif
Expand Down
13 changes: 1 addition & 12 deletions drivers/source/SerialBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,9 @@ namespace mbed {

SerialBase::SerialBase(PinName tx, PinName rx, int baud) :
#if DEVICE_SERIAL_ASYNCH
_thunk_irq(this), _tx_usage(DMA_USAGE_NEVER),
_rx_usage(DMA_USAGE_NEVER), _tx_callback(NULL),
_rx_callback(NULL), _tx_asynch_set(false),
_rx_asynch_set(false),
_thunk_irq(this),
#endif
_serial(),
_baud(baud),
#if DEVICE_SERIAL_FC
_flow_type(Disabled),
_flow1(NC),
_flow2(NC),
#endif
_rx_enabled(true),
_tx_enabled(true),
_tx_pin(tx),
_rx_pin(rx)
{
Expand Down