diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2020-11-20 21:25:46 +0300 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2021-04-20 23:54:14 +0300 |
commit | 28073eb09c5aa29e879490edb88cfd3e7073821e (patch) | |
tree | f8ed402d614c5f8f14c73dbc39597942a3787760 /security | |
parent | 282c0a4d15b6d44b4684e2a4e19785c9fbcc102f (diff) | |
download | linux-28073eb09c5aa29e879490edb88cfd3e7073821e.tar.xz |
ima: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of just
letting the code fall through to the next case.
Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/ima/ima_main.c | 1 | ||||
-rw-r--r-- | security/integrity/ima/ima_policy.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 3944f422d559..53a7d96f203d 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -786,6 +786,7 @@ int ima_load_data(enum kernel_load_data_id id, bool contents) pr_err("impossible to appraise a module without a file descriptor. sig_enforce kernel parameter might help\n"); return -EACCES; /* INTEGRITY_UNKNOWN */ } + break; default: break; } diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index 4f8cb155e4fd..fd5d46e511f1 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -599,6 +599,7 @@ static bool ima_match_rules(struct ima_rule_entry *rule, rc = ima_filter_rule_match(secid, rule->lsm[i].type, Audit_equal, rule->lsm[i].rule); + break; default: break; } @@ -836,6 +837,7 @@ void __init ima_init_policy(void) add_rules(default_measurement_rules, ARRAY_SIZE(default_measurement_rules), IMA_DEFAULT_POLICY); + break; default: break; } |