git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
686e9ef
)
lib: missing fallthrough comment in vsnprintf_internal()
author
Heinrich Schuchardt
<heinrich.schuchardt@canonical.com>
Sat, 1 Apr 2023 06:13:42 +0000
(08:13 +0200)
committer
Tom 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
patch
|
blob
|
history
diff --git
a/lib/vsprintf.c
b/lib/vsprintf.c
index
2d13e68
..
e87503e
100644
(file)
--- a/
lib/vsprintf.c
+++ b/
lib/vsprintf.c
@@
-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;