]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lib: missing fallthrough comment in vsnprintf_internal()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 1 Apr 2023 06:13:42 +0000 (08:13 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 6 Apr 2023 23:10:08 +0000 (19:10 -0400)
When a case statement intentionally falls through we should add a comment.
Cf. -Wimplicit-fallthrough

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/vsprintf.c

index 2d13e68b57980c1a9bbb5b6d1568eabcac4fcb9b..e87503e41ada772d7e54bfc14a672a95d9521323 100644 (file)
@@ -674,6 +674,7 @@ repeat:
 
                case 'x':
                        flags |= SMALL;
+               /* fallthrough */
                case 'X':
                        base = 16;
                        break;
@@ -681,8 +682,10 @@ repeat:
                case 'd':
                        if (fmt[1] == 'E')
                                flags |= ERRSTR;
+               /* fallthrough */
                case 'i':
                        flags |= SIGN;
+               /* fallthrough */
                case 'u':
                        break;