File 0792-erts-Fix-bugs-found-by-Wimplicit-fallthrough.patch of Package erlang

From 8bd211eb3365ab536c9ab4e43ec8a3e67ae67366 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= <lukas@erlang.org>
Date: Mon, 28 Oct 2024 09:33:15 +0100
Subject: [PATCH 02/10] erts: Fix bugs found by -Wimplicit-fallthrough

---
 erts/emulator/beam/io.c                 | 3 +++
 erts/lib_src/common/erl_printf_format.c | 1 +
 lib/erl_interface/src/misc/show_msg.c   | 1 +
 3 files changed, 5 insertions(+)

diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index a80b1863ea..be2a3e36a7 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -5431,10 +5431,13 @@ erts_stale_drv_select(Eterm port,
     switch (mode) {
     case ERL_DRV_READ | ERL_DRV_WRITE:
 	type = "Input/Output";
+        break;
     case ERL_DRV_WRITE:
 	type = "Output";
+        break;
     case ERL_DRV_READ:
 	type = "Input";
+        break;
     default:
         type = "";
     }
diff --git a/erts/lib_src/common/erl_printf_format.c b/erts/lib_src/common/erl_printf_format.c
index f4a32615b7..9449e9f26a 100644
--- a/erts/lib_src/common/erl_printf_format.c
+++ b/erts/lib_src/common/erl_printf_format.c
@@ -575,6 +575,7 @@ int erts_printf_format(fmtfn_t fn, void* arg, char* fmt, va_list ap)
 #else
 #error No 16-bit integer datatype found
 #endif
+                        break;
 		    case 8:
 #if SIZEOF_CHAR == 1
 			fmt |= FMTL_hh;
diff --git a/lib/erl_interface/src/misc/show_msg.c b/lib/erl_interface/src/misc/show_msg.c
index 87fd970165..482788eee7 100644
--- a/lib/erl_interface/src/misc/show_msg.c
+++ b/lib/erl_interface/src/misc/show_msg.c
@@ -157,6 +157,7 @@ int ei_show_sendmsg(FILE *stream, const char *header, const char *msgbuf)
 	if (ei_decode_pid(header,&index,&msg.from) 
 	    || ei_decode_pid(header,&index,&msg.to)) return -1;
 	mbuf = header+index;
+        break;
 
     case ERL_EXIT_TT:
     case ERL_EXIT2_TT:
-- 
2.43.0

openSUSE Build Service is sponsored by