diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-12-15 11:06:10 +0100 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2019-02-04 23:36:01 +0100 |
commit | c8b37524d3cdbcf07426529cb83b38b1240cb54d (patch) | |
tree | feeb97672e4d285caef7ff3f0ea0cca93e9b3ae6 /security | |
parent | encrypted-keys: fix Opt_err/Opt_error = -1 (diff) | |
download | linux-c8b37524d3cdbcf07426529cb83b38b1240cb54d.tar.xz linux-c8b37524d3cdbcf07426529cb83b38b1240cb54d.zip |
evm: remove set but not used variable 'xattr'
Fixes gcc '-Wunused-but-set-variable' warning:
security/integrity/evm/evm_main.c: In function 'init_evm':
security/integrity/evm/evm_main.c:566:21: warning:
variable 'xattr' set but not used [-Wunused-but-set-variable]
Commit 21af76631476 ("EVM: turn evm_config_xattrnames into a list")
defined and set "xattr", but never used it.
[zohar@linux.ibm.com: tweaked the patch description explanation]
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/evm/evm_main.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index 5ecaa3d6fe0b..b6d9f14bc234 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c @@ -563,7 +563,6 @@ static int __init init_evm(void) { int error; struct list_head *pos, *q; - struct xattr_list *xattr; evm_init_config(); @@ -580,11 +579,8 @@ static int __init init_evm(void) error: if (error != 0) { if (!list_empty(&evm_config_xattrnames)) { - list_for_each_safe(pos, q, &evm_config_xattrnames) { - xattr = list_entry(pos, struct xattr_list, - list); + list_for_each_safe(pos, q, &evm_config_xattrnames) list_del(pos); - } } } |