Skip to contentSkip to conversation

: Fix ipcomp warnings...

PATCH In review David Miller 2 participants 2 messages Jul 27, 2008

Subsystems (4)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 1/1 : Fix ipcomp warnings...

Herbert just FYI, I checked the following into net-2.6

ipcomp: Fix warnings after ipcomp consolidation.

net/ipv4/ipcomp.c: In function ‘ipcomp4_init_state’:
net/ipv4/ipcomp.c:109: warning: unused variable ‘calg_desc’ net/ipv4/ipcomp.c:108: warning: unused variable ‘ipcd’ net/ipv4/ipcomp.c:107: warning: ‘err’ may be used uninitialized in this function net/ipv6/ipcomp6.c: In function ‘ipcomp6_init_state’:
net/ipv6/ipcomp6.c:139: warning: unused variable ‘calg_desc’ net/ipv6/ipcomp6.c:138: warning: unused variable ‘ipcd’ net/ipv6/ipcomp6.c:137: warning: ‘err’ may be used uninitialized in this function

---
 net/ipv4/ipcomp.c  |    4 +---
 net/ipv6/ipcomp6.c |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
net/ipv4/ipcomp.c +1 -3
index a42b64d..38ccb6d 100644
@@ -104,9 +104,7 @@ out:
 
 static int ipcomp4_init_state(struct xfrm_state *x)
 {
-	int err;
-	struct ipcomp_data *ipcd;
-	struct xfrm_algo_desc *calg_desc;
+	int err = -EINVAL;
 
 	x->props.header_len = 0;
 	switch (x->props.mode) {
net/ipv6/ipcomp6.c +1 -3
index 0cfcea4..4545e43 100644
@@ -134,9 +134,7 @@ out:
 
 static int ipcomp6_init_state(struct xfrm_state *x)
 {
-	int err;
-	struct ipcomp_data *ipcd;
-	struct xfrm_algo_desc *calg_desc;
+	int err = -EINVAL;
 
 	x->props.header_len = 0;
 	switch (x->props.mode) {
Signature · 1 line
1.6.0.rc0.14.g95f8
maintainer
#1 lore raw
Quoted 2 lines · David Miller

Herbert just FYI, I checked the following into net-2.6

Thanks Dave! I think when I tested this somehow the kernel decided to do a total rebuild so the warnings slipped through.

Cheers,

Signature · 4 lines
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