Skip to content

Commit 0f949bc

Browse files
malaterreJames Morris
authored andcommitted
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: Mathieu Malaterre <malat@debian.org> Signed-off-by: James Morris <james.morris@microsoft.com>
1 parent 5b73262 commit 0f949bc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎security/keys/process_keys.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx)
379379
case -EAGAIN: /* no key */
380380
if (ret)
381381
break;
382+
/* fall through */
382383
case -ENOKEY: /* negative key */
383384
ret = key_ref;
384385
break;
@@ -403,6 +404,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx)
403404
case -EAGAIN: /* no key */
404405
if (ret)
405406
break;
407+
/* fall through */
406408
case -ENOKEY: /* negative key */
407409
ret = key_ref;
408410
break;
@@ -423,6 +425,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx)
423425
case -EAGAIN: /* no key */
424426
if (ret)
425427
break;
428+
/* fall through */
426429
case -ENOKEY: /* negative key */
427430
ret = key_ref;
428431
break;

0 commit comments

Comments
 (0)