提交 7e6bd6f3 编写于 作者: A Andy Shevchenko 提交者: Petr Mladek

lib/vsprintf: Mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Link: http://lkml.kernel.org/r/20180216210711.79901-9-andriy.shevchenko@linux.intel.com
To: "Tobin C . Harding" <me@tobin.cc>
To: linux@rasmusvillemoes.dk
To: Joe Perches <joe@perches.com>
To: linux-kernel@vger.kernel.org
To: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NPetr Mladek <pmladek@suse.com>
上级 91efafb1
...@@ -2092,6 +2092,7 @@ int format_decode(const char *fmt, struct printf_spec *spec) ...@@ -2092,6 +2092,7 @@ int format_decode(const char *fmt, struct printf_spec *spec)
case 'x': case 'x':
spec->flags |= SMALL; spec->flags |= SMALL;
/* fall through */
case 'X': case 'X':
spec->base = 16; spec->base = 16;
...@@ -3046,8 +3047,10 @@ int vsscanf(const char *buf, const char *fmt, va_list args) ...@@ -3046,8 +3047,10 @@ int vsscanf(const char *buf, const char *fmt, va_list args)
break; break;
case 'i': case 'i':
base = 0; base = 0;
/* fall through */
case 'd': case 'd':
is_sign = true; is_sign = true;
/* fall through */
case 'u': case 'u':
break; break;
case '%': case '%':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册