Commit 0f949bcc authored by Mathieu Malaterre's avatar Mathieu Malaterre Committed by James Morris

security: keys: annotate implicit fall throughs

There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings (W=1). Fix them up.

This commit remove the following warning:

  security/keys/process_keys.c:380:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
  security/keys/process_keys.c:404:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
  security/keys/process_keys.c:424:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
Signed-off-by: default avatarMathieu Malaterre <malat@debian.org>
Signed-off-by: default avatarJames Morris <james.morris@microsoft.com>
parent 5b73262a
...@@ -379,6 +379,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx) ...@@ -379,6 +379,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx)
case -EAGAIN: /* no key */ case -EAGAIN: /* no key */
if (ret) if (ret)
break; break;
/* fall through */
case -ENOKEY: /* negative key */ case -ENOKEY: /* negative key */
ret = key_ref; ret = key_ref;
break; break;
...@@ -403,6 +404,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx) ...@@ -403,6 +404,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx)
case -EAGAIN: /* no key */ case -EAGAIN: /* no key */
if (ret) if (ret)
break; break;
/* fall through */
case -ENOKEY: /* negative key */ case -ENOKEY: /* negative key */
ret = key_ref; ret = key_ref;
break; break;
...@@ -423,6 +425,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx) ...@@ -423,6 +425,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx)
case -EAGAIN: /* no key */ case -EAGAIN: /* no key */
if (ret) if (ret)
break; break;
/* fall through */
case -ENOKEY: /* negative key */ case -ENOKEY: /* negative key */
ret = key_ref; ret = key_ref;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment