Fix fallthrough typo in XTF common/libc/vsnprintf.c
PATCH 1/1 Fix fallthrough typo in XTF common/libc/vsnprintf.c
fallthrough in one case is missing the r.
This fails to suppress -Wimplicit-fallthrough warning with GCC7
common/libc/vsnprintf.c:388:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
flags |= SIGNED;
^common/libc/vsnprintf.c:390:9: note: here
case 'u': /* Unsigned decimal. */
^~~~
cc1: all warnings being treated as errors
--- common/libc/vsnprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/libc/vsnprintf.c +1 -1
@@ -386,7 +386,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)case 'd' :case 'i' :/* Signed decimal. */ flags |=SIGNED ; -/* fallthough */ +/* fallthrough */ case 'u' :/* Unsigned decimal. */ base =10 ;break ;
Signature · 7 lines
2.13.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 4 lines · John Thomson
fallthrough in one case is missing the r.
This fails to suppress -Wimplicit-fallthrough warning with GCC7
common/libc/vsnprintf.c:388:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
Quoted 8 lines
flags |= SIGNED; ^
common/libc/vsnprintf.c:390:9: note: here
case 'u': /* Unsigned decimal. */
^~~~
cc1: all warnings being treated as errorsSigned-off-by John Thomson <[email protected]>
I think I noticed this ages ago and didn't have time to fix it. I thought to myself "what's the worst that could happen?"
Reviewed and applied, thanks.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel