Skip to content

Commit

Permalink
capabilities:: annotate implicit fall through
Browse files Browse the repository at this point in the history
There is a plan to build the kernel with -Wimplicit-fallthrough and
this place in the code produced a warning (W=1).

In this particular case change put the fall through comment on a single
line so as to match the regular expression expected by GCC.

This commit remove the following warning:

  kernel/capability.c:95:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Mathieu Malaterre <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
malaterre authored and James Morris committed Jan 23, 2019
1 parent 6c2976b commit 39e83be
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ static int cap_validate_magic(cap_user_header_t header, unsigned *tocopy)
break;
case _LINUX_CAPABILITY_VERSION_2:
warn_deprecated_v2();
/*
* fall through - v3 is otherwise equivalent to v2.
*/
/* fall through - v3 is otherwise equivalent to v2. */
case _LINUX_CAPABILITY_VERSION_3:
*tocopy = _LINUX_CAPABILITY_U32S_3;
break;
Expand Down

0 comments on commit 39e83be

Please sign in to comment.