Skip to content

Commit

Permalink
lib/vsprintf: Mark expected switch fall-through
Browse files Browse the repository at this point in the history
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
  • Loading branch information
Andy Shevchenko authored and Petr Mladek committed Apr 11, 2018
1 parent 91efafb commit 7e6bd6f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/vsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2092,6 +2092,7 @@ int format_decode(const char *fmt, struct printf_spec *spec)

case 'x':
spec->flags |= SMALL;
/* fall through */

case 'X':
spec->base = 16;
Expand Down Expand Up @@ -3046,8 +3047,10 @@ int vsscanf(const char *buf, const char *fmt, va_list args)
break;
case 'i':
base = 0;
/* fall through */
case 'd':
is_sign = true;
/* fall through */
case 'u':
break;
case '%':
Expand Down

0 comments on commit 7e6bd6f

Please sign in to comment.