netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* authenc compile warnings in current net-2.6.24
@ 2007-10-10 17:53 Oliver Hartkopp
  2007-10-10 19:53 ` Sebastian Siewior
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Hartkopp @ 2007-10-10 17:53 UTC (permalink / raw)
  To: Herbert Xu; +Cc: netdev

Hi Herbert,

CC [M] crypto/authenc.o
crypto/authenc.c: In function ‘crypto_authenc_hash’:
crypto/authenc.c:88: warning: ‘cryptlen’ may be used uninitialized in 
this function
crypto/authenc.c:87: warning: ‘dst’ may be used uninitialized in this 
function
crypto/authenc.c: In function ‘crypto_authenc_decrypt’:
crypto/authenc.c:163: warning: ‘cryptlen’ may be used uninitialized in 
this function
crypto/authenc.c:163: note: ‘cryptlen’ was declared here
crypto/authenc.c:162: warning: ‘src’ may be used uninitialized in this 
function
crypto/authenc.c:162: note: ‘src’ was declared here

do you already know these warnings?

Oliver

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: authenc compile warnings in current net-2.6.24
@ 2007-10-12  6:15 Oliver Hartkopp
  2007-10-12 10:18 ` Herbert Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Hartkopp @ 2007-10-12  6:15 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, netdev

Hi Dave,

this compile fix seems not to be applied (maybe my compiler is the only 
one who complains ;-)

Acked-by: Oliver Hartkopp <oliver@hartkopp.net>

Thanks!


On Thu, Oct 11, 2007 at 11:23:30AM +0800, Herbert Xu wrote:
>
> Yeah I've added a fix in the cryptodev tree.

Oh and here's the actual patch.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
1cd6038ce42447f9a32e6d138af0b69ad56ea627
diff --git a/crypto/authenc.c b/crypto/authenc.c
index 0b29a6a..126a529 100644
--- a/crypto/authenc.c
+++ b/crypto/authenc.c
@@ -84,8 +84,8 @@ static int crypto_authenc_hash(struct aead_request *req)
 		.tfm = auth,
 	};
 	u8 *hash = aead_request_ctx(req);
-	struct scatterlist *dst;
-	unsigned int cryptlen;
+	struct scatterlist *dst = req->dst;
+	unsigned int cryptlen = req->cryptlen;
 	int err;
 
 	hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth), 
@@ -100,8 +100,6 @@ static int crypto_authenc_hash(struct aead_request *req)
 	if (err)
 		goto auth_unlock;
 
-	cryptlen = req->cryptlen;
-	dst = req->dst;
 	err = crypto_hash_update(&desc, dst, cryptlen);
 	if (err)
 		goto auth_unlock;
@@ -159,8 +157,8 @@ static int crypto_authenc_verify(struct aead_request *req)
 	};
 	u8 *ohash = aead_request_ctx(req);
 	u8 *ihash;
-	struct scatterlist *src;
-	unsigned int cryptlen;
+	struct scatterlist *src = req->src;
+	unsigned int cryptlen = req->cryptlen;
 	unsigned int authsize;
 	int err;
 
@@ -177,8 +175,6 @@ static int crypto_authenc_verify(struct aead_request *req)
 	if (err)
 		goto auth_unlock;
 
-	cryptlen = req->cryptlen;
-	src = req->src;
 	err = crypto_hash_update(&desc, src, cryptlen);
 	if (err)
 		goto auth_unlock;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-10-12 10:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-10 17:53 authenc compile warnings in current net-2.6.24 Oliver Hartkopp
2007-10-10 19:53 ` Sebastian Siewior
2007-10-10 23:25   ` David Miller
2007-10-11  3:23     ` Herbert Xu
2007-10-11  3:26       ` Herbert Xu
2007-10-11 10:58     ` Sebastian Siewior
2007-10-11 16:38       ` Oliver Hartkopp
  -- strict thread matches above, loose matches on Subject: below --
2007-10-12  6:15 Oliver Hartkopp
2007-10-12 10:18 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).