From 8744025545236c4623b04720cf1077293d6d651d Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 23 Dec 2019 13:36:05 +0100 Subject: iface-modem-simple: fix warnings with -Wimplicit-fallthrough MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mm-iface-modem-simple.c: In function ‘connection_step’: mm-iface-modem-simple.c:539:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 539 | ctx->step++; | ~~~~~~~~~^~ ... --- src/mm-iface-modem-simple.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/mm-iface-modem-simple.c') diff --git a/src/mm-iface-modem-simple.c b/src/mm-iface-modem-simple.c index 7d1f0e9e..ac845d76 100644 --- a/src/mm-iface-modem-simple.c +++ b/src/mm-iface-modem-simple.c @@ -536,8 +536,8 @@ connection_step (ConnectionContext *ctx) switch (ctx->step) { case CONNECTION_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case CONNECTION_STEP_UNLOCK_CHECK: mm_info ("Simple connect state (%d/%d): Unlock check", @@ -590,9 +590,9 @@ connection_step (ConnectionContext *ctx) } /* If not 3GPP and not CDMA, this will possibly be a POTS modem, - * which won't require any specific registration anywhere. - * So, fall down to next step */ + * which won't require any specific registration anywhere. */ ctx->step++; + /* fall through */ case CONNECTION_STEP_BEARER: { MMBearerList *list = NULL; @@ -675,9 +675,8 @@ connection_step (ConnectionContext *ctx) mm_base_bearer_get_path (ctx->bearer)); g_object_unref (list); g_object_unref (bearer_properties); - /* Fall down to next step */ ctx->step++; - } + } /* fall through */ case CONNECTION_STEP_CONNECT: mm_info ("Simple connect state (%d/%d): Connect", @@ -699,8 +698,8 @@ connection_step (ConnectionContext *ctx) mm_dbg ("Bearer at '%s' is already connected...", mm_base_bearer_get_path (ctx->bearer)); - /* Fall down to next step */ ctx->step++; + /* fall through */ case CONNECTION_STEP_LAST: mm_info ("Simple connect state (%d/%d): All done", -- cgit v1.2.3-70-g09d2