From 8d3d1183b9448ae9f4b87dda66aaf3314563b427 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sat, 11 Jan 2020 13:34:59 +0100 Subject: [PATCH] port-serial: fix warnings with -Wimplicit-fallthrough MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mm-port-serial.c: In function ‘port_serial_process_command’: mm-port-serial.c:605:16: error: this statement may fall through [-Werror=implicit-fallthrough=] 605 | if (written > 0) { | ^ mm-port-serial.c:611:9: note: here 611 | case G_IO_STATUS_AGAIN: | ^~~~ --- src/mm-port-serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c index 3c4db6df..5e8db484 100644 --- a/src/mm-port-serial.c +++ b/src/mm-port-serial.c @@ -606,7 +606,8 @@ port_serial_process_command (MMPortSerial *self, ctx->idx += written; break; } - /* If written == 0, treat as EAGAIN, so fall down */ + /* If written == 0 treat as EAGAIN */ + /* Fall through */ case G_IO_STATUS_AGAIN: /* We're in a non-blocking channel and therefore we're up to receive