diff mbox series

[1/1] xyz-modem: Add missing fallthrough annotation

Message ID 20241102104112.110838-1-heinrich.schuchardt@canonical.com
State Accepted
Commit e54ddc32cf09dc43f7321431d8047ec6eabb5bbf
Delegated to: Tom Rini
Headers show
Series [1/1] xyz-modem: Add missing fallthrough annotation | expand

Commit Message

Heinrich Schuchardt Nov. 2, 2024, 10:41 a.m. UTC
Falltroughs in switch statements should be explicit.

Addresses-Coverity-ID: 131162 Missing break in switch
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 common/xyzModem.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tom Rini Nov. 15, 2024, 4:27 a.m. UTC | #1
On Sat, 02 Nov 2024 11:41:12 +0100, Heinrich Schuchardt wrote:

> Falltroughs in switch statements should be explicit.
> 
> 

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/xyzModem.c b/common/xyzModem.c
index 09f74a1f0c7..698a538a148 100644
--- a/common/xyzModem.c
+++ b/common/xyzModem.c
@@ -280,6 +280,7 @@  xyzModem_get_hdr (void)
 	    {
 	    case SOH:
 	      xyz.total_SOH++;
+	      fallthrough;
 	    case STX:
 	      if (c == STX)
 		xyz.total_STX++;