IMA: remove -Wmissing-prototypes warning
Subsystems (4)
PATCH 1/1 IMA: remove -Wmissing-prototypes warning
From: Austin Kim <[email protected]>
With W=1 build, the compiler throws warning message as below:
security/integrity/ima/ima_mok.c:24:12: warning:
no previous prototype for ‘ima_mok_init’ [-Wmissing-prototypes]
__init int ima_mok_init(void)
Silence the warning by adding static keyword to ima_mok_init().
--- security/integrity/ima/ima_mok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/ima/ima_mok.c +1 -1
@@ -21,7 +21,7 @@ struct key *ima_blacklist_keyring;/* * Allocate the IMA blacklist keyring */ -__init int ima_mok_init (void ) +static __init int ima_mok_init (void ) {struct key_restriction *restriction;
Signature · 1 line
2.20.1
Mimi Zohar
maintainer[Cc: Petko Manolov <[email protected]>]
Hi Austin,
Quoted 20 lines · Austin Kim
From: Austin Kim <[email protected]>
With W=1 build, the compiler throws warning message as below:
security/integrity/ima/ima_mok.c:24:12: warning:
no previous prototype for ‘ima_mok_init’ [-Wmissing-prototypes]
__initintima_mok_init(void)Silence the warning by adding static keyword to
ima_mok_init().Signed-off-by Austin Kim <[email protected]>--- security/integrity/ima/ima_mok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/integrity/ima/ima_mok.c +0
-0
security/integrity/ima/ima_mok.c struct key *ima_blacklist_keyring; · line 27
Quoted 8 lines
security/integrity/ima/ima_mok.c +1
-1@@ -21,7 +21,7 @@ struct key *ima_blacklist_keyring;/* * Allocate the IMA blacklist keyring */ -__init int ima_mok_init (void ) +static __init int ima_mok_init (void ) {struct key_restriction *restriction;
Thank you for the patch, which does fix the warning. The .ima_mok
keyring was removed a while ago. With all the recent work on the system blacklist, I'm wondering if anyone is still using the IMA blacklist keyring or whether it should be removed as well.
thanks,
Mimi
2021년 6월 29일 (화) 오후 11:30, Mimi Zohar <[email protected]>님이 작성:
Quoted 31 lines
[Cc: Petko Manolov <[email protected]>]
Hi Austin,
Quoted 25 lines · Austin Kim
From: Austin Kim <[email protected]>
With W=1 build, the compiler throws warning message as below:
security/integrity/ima/ima_mok.c:24:12: warning:
no previous prototype for ‘ima_mok_init’ [-Wmissing-prototypes]
__initintima_mok_init(void)Silence the warning by adding static keyword to
ima_mok_init().Signed-off-by Austin Kim <[email protected]>--- security/integrity/ima/ima_mok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/integrity/ima/ima_mok.c +1
-1@@ -21,7 +21,7 @@ struct key *ima_blacklist_keyring;/* * Allocate the IMA blacklist keyring */ -__init int ima_mok_init (void ) +static __init int ima_mok_init (void )
Quoted 8 lines
security/integrity/ima/ima_mok.c struct key *ima_blacklist_keyring; · line 27
Quoted 3 lines
security/integrity/ima/ima_mok.c +0
-0{struct key_restriction *restriction;Thank you for the patch, which does fix the warning. The .ima_mok
keyring was removed a while ago. With all the recent work on the system blacklist, I'm wondering if anyone is still using the IMA blacklist keyring or whether it should be removed as well.
Oh! Thanks for information.
Quoted 5 lines
thanks,
Mimi