[PATCH -next] integrity: Remove set but not used variable 'acl'

Subsystems: extended verification module (evm), integrity measurement architecture (ima), security subsystem, the rest

STALE2632d

3 messages, 2 authors, 2019-07-04 · open the first message on its own page

[PATCH -next] integrity: Remove set but not used variable 'acl'

From: YueHaibing <hidden>
Date: 2019-07-03 02:57:57

Fixes gcc '-Wunused-but-set-variable' warning:

security/integrity/digsig.c: In function 'integrity_init_keyring':
security/integrity/digsig.c:99:18: warning:
 variable 'acl' set but not used [-Wunused-but-set-variable]

It seems 'acl' is needed in __integrity_init_keyring

Fixes: 6100ac53909d ("keys: Replace uid/gid/perm permissions checking with an ACL")
Signed-off-by: YueHaibing <redacted>
---
 security/integrity/digsig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
index 1f2c43f62047..f9f3c8ffe786 100644
--- a/security/integrity/digsig.c
+++ b/security/integrity/digsig.c
@@ -114,7 +114,7 @@ int __init integrity_init_keyring(const unsigned int id)
 	acl = &internal_writable_keyring_acl;
 
 out:
-	return __integrity_init_keyring(id, &internal_keyring_acl, restriction);
+	return __integrity_init_keyring(id, acl, restriction);
 }
 
 static int __init integrity_add_key(const unsigned int id, const void *data,


Re: [PATCH -next] integrity: Remove set but not used variable 'acl'

From: David Howells <dhowells@redhat.com>
Date: 2019-07-03 13:57:57

YueHaibing [off-list ref] wrote:
Fixes gcc '-Wunused-but-set-variable' warning:

security/integrity/digsig.c: In function 'integrity_init_keyring':
security/integrity/digsig.c:99:18: warning:
 variable 'acl' set but not used [-Wunused-but-set-variable]

It seems 'acl' is needed in __integrity_init_keyring
I've folded this fix in, thanks.

David

Re: [PATCH -next] integrity: Remove set but not used variable 'acl'

From: Yuehaibing <hidden>
Date: 2019-07-04 01:23:23

On 2019/7/3 21:57, David Howells wrote:
YueHaibing [off-list ref] wrote:
quoted
Fixes gcc '-Wunused-but-set-variable' warning:

security/integrity/digsig.c: In function 'integrity_init_keyring':
security/integrity/digsig.c:99:18: warning:
 variable 'acl' set but not used [-Wunused-but-set-variable]

It seems 'acl' is needed in __integrity_init_keyring
I've folded this fix in, thanks.
Thanks, also I write a wrong patch title.
David

.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help