2009-03-25 15:17:22

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH] crypto: testmgr - Kill test_comp() sparse warnings

make C=1:
| crypto/testmgr.c:846:45: warning: incorrect type in argument 5 (different signedness)
| crypto/testmgr.c:846:45: expected unsigned int *dlen
| crypto/testmgr.c:846:45: got int *<noident>
| crypto/testmgr.c:878:47: warning: incorrect type in argument 5 (different signedness)
| crypto/testmgr.c:878:47: expected unsigned int *dlen
| crypto/testmgr.c:878:47: got int *<noident>

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
crypto/testmgr.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index b50c3c6..bfee6e9 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -837,7 +837,8 @@ static int test_comp(struct crypto_comp *tfm, struct comp_testvec *ctemplate,
int ret;

for (i = 0; i < ctcount; i++) {
- int ilen, dlen = COMP_BUF_SIZE;
+ int ilen;
+ unsigned int dlen = COMP_BUF_SIZE;

memset(result, 0, sizeof (result));

@@ -869,7 +870,8 @@ static int test_comp(struct crypto_comp *tfm, struct comp_testvec *ctemplate,
}

for (i = 0; i < dtcount; i++) {
- int ilen, dlen = COMP_BUF_SIZE;
+ int ilen;
+ unsigned int dlen = COMP_BUF_SIZE;

memset(result, 0, sizeof (result));

--
1.6.0.4



2009-03-25 15:17:22

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH] crypto: pcomp - pcompress.c should include <crypto/internal/compress.h>

make C=1:
| crypto/pcompress.c:77:5: warning: symbol 'crypto_register_pcomp' was not declared. Should it be static?
| crypto/pcompress.c:89:5: warning: symbol 'crypto_unregister_pcomp' was not declared. Should it be static?

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
crypto/pcompress.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/crypto/pcompress.c b/crypto/pcompress.c
index ca9a4af..bcadc03 100644
--- a/crypto/pcompress.c
+++ b/crypto/pcompress.c
@@ -26,6 +26,7 @@
#include <linux/string.h>

#include <crypto/compress.h>
+#include <crypto/internal/compress.h>

#include "internal.h"

--
1.6.0.4


2009-03-29 07:45:58

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: testmgr - Kill test_comp() sparse warnings

On Wed, Mar 25, 2009 at 04:17:17PM +0100, Geert Uytterhoeven wrote:
> make C=1:
> | crypto/testmgr.c:846:45: warning: incorrect type in argument 5 (different signedness)
> | crypto/testmgr.c:846:45: expected unsigned int *dlen
> | crypto/testmgr.c:846:45: got int *<noident>
> | crypto/testmgr.c:878:47: warning: incorrect type in argument 5 (different signedness)
> | crypto/testmgr.c:878:47: expected unsigned int *dlen
> | crypto/testmgr.c:878:47: got int *<noident>
>
> Signed-off-by: Geert Uytterhoeven <[email protected]>

Both patches applied. Thanks Geert!
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt