Skip to contentSkip to conversation

ubi: Fix fall-through warnings for Clang

PATCH Superseded Gustavo A. R. Silva 1 participant 1 message Mar 5, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ubi: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

---
Changes in v3:
Update the changelog text according to the actual code change.

Changes in v2:
Make use of a break statement instead of fallthrough, for consistency.

 drivers/mtd/ubi/build.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mtd/ubi/build.c +1 -0
index f399edc82191..a7e3eb9befb6 100644
@@ -1350,6 +1350,7 @@ static int bytes_str_to_int(const char *str)
 		fallthrough;
 	case 'K':
 		result *= 1024;
+		break;
 	case '\0':
 		break;
 	default:
Signature · 6 lines
2.27.0


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/