From b3fde3429ce784c9dbdabbb74c9b1ccd7cec2cc3 Mon Sep 17 00:00:00 2001 From: smlng Date: Wed, 24 Jan 2018 22:04:44 +0100 Subject: [PATCH] gnrc/lwmac: ignore implicit fallthrough error by GCC 7 --- sys/net/gnrc/link_layer/lwmac/lwmac.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sys/net/gnrc/link_layer/lwmac/lwmac.c b/sys/net/gnrc/link_layer/lwmac/lwmac.c index e59f8bac37..11b651cf52 100644 --- a/sys/net/gnrc/link_layer/lwmac/lwmac.c +++ b/sys/net/gnrc/link_layer/lwmac/lwmac.c @@ -572,26 +572,25 @@ static void _tx_management(gnrc_netif_t *netif) gnrc_lwmac_tx_state_t state_tx = netif->mac.tx.state; switch (state_tx) { - case GNRC_LWMAC_TX_STATE_STOPPED: { + case GNRC_LWMAC_TX_STATE_STOPPED: _tx_management_stopped(netif); break; - } - case GNRC_LWMAC_TX_STATE_FAILED: { + + case GNRC_LWMAC_TX_STATE_FAILED: /* If transmission failure, do not try burst transmissions and quit other * transmission attempts in this cycle for collision avoidance */ gnrc_lwmac_set_tx_continue(netif, false); gnrc_lwmac_set_quit_tx(netif, true); - /* falls through */ - /* TX packet will therefore be dropped. No automatic resending here, - * we did our best. - */ - } - case GNRC_LWMAC_TX_STATE_SUCCESSFUL: { + /* TX packet will be dropped, no automatic resending here. */ + /* Intentionally falls through */ + + case GNRC_LWMAC_TX_STATE_SUCCESSFUL: _tx_management_success(netif); break; - } + default: gnrc_lwmac_tx_update(netif); + break; } /* If state has changed, reschedule main state machine */