Skip to content

Commit

Permalink
evm: remove set but not used variable 'xattr'
Browse files Browse the repository at this point in the history
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 21af766 ("EVM: turn evm_config_xattrnames into a list")
defined and set "xattr", but never used it.

[[email protected]: tweaked the patch description explanation]
Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
  • Loading branch information
YueHaibing authored and mimizohar committed Feb 4, 2019
1 parent 107dfa2 commit c8b3752
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions security/integrity/evm/evm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ static int __init init_evm(void)
{
int error;
struct list_head *pos, *q;
struct xattr_list *xattr;

evm_init_config();

Expand All @@ -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);
}
}
}

Expand Down

0 comments on commit c8b3752

Please sign in to comment.