2014-07-28 13:17:42

by weiyj_lk

[permalink] [raw]
Subject: [PATCH -next] PKCS#7: fix sparse non static symbol warning

From: Wei Yongjun <[email protected]>

Fixes the following sparse warnings:

crypto/asymmetric_keys/pkcs7_key_type.c:73:17: warning:
symbol 'key_type_pkcs7' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <[email protected]>
---
crypto/asymmetric_keys/pkcs7_key_type.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/asymmetric_keys/pkcs7_key_type.c b/crypto/asymmetric_keys/pkcs7_key_type.c
index 8605ff6..9c60e9c 100644
--- a/crypto/asymmetric_keys/pkcs7_key_type.c
+++ b/crypto/asymmetric_keys/pkcs7_key_type.c
@@ -70,7 +70,7 @@ error:
* user defined keys take an arbitrary string as the description and an
* arbitrary blob of data as the payload
*/
-struct key_type key_type_pkcs7 = {
+static struct key_type key_type_pkcs7 = {
.name = "pkcs7_test",
.def_lookup_type = KEYRING_SEARCH_LOOKUP_DIRECT,
.preparse = pkcs7_preparse,


2014-07-28 13:58:08

by David Howells

[permalink] [raw]
Subject: Re: [PATCH -next] PKCS#7: fix sparse non static symbol warning

[email protected] wrote:

> From: Wei Yongjun <[email protected]>
>
> Fixes the following sparse warnings:
>
> crypto/asymmetric_keys/pkcs7_key_type.c:73:17: warning:
> symbol 'key_type_pkcs7' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <[email protected]>

Applied.