Message ID | 1306138981.2869.2.camel@edumazet-laptop |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Mon, May 23, 2011 at 10:23 +0200, Eric Dumazet wrote: > net/ipv4/ping.c: In function ‘ping_v4_unhash’: > net/ipv4/ping.c:140:28: warning: variable ‘hslot’ set but not used > > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Vasiliy Kulikov <segoon@openwall.com> hslot was used for debugging purposes here. BTW, what gcc version do you use? I have no warning with 4.4.3 (Ubuntu 4.4.3-4ubuntu5): $ make net/ipv4/ping.o CHK include/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh CC net/ipv4/ping.o $ Thanks,
Le lundi 23 mai 2011 à 12:43 +0400, Vasiliy Kulikov a écrit : > On Mon, May 23, 2011 at 10:23 +0200, Eric Dumazet wrote: > > net/ipv4/ping.c: In function ‘ping_v4_unhash’: > > net/ipv4/ping.c:140:28: warning: variable ‘hslot’ set but not used > > > > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> > > Acked-by: Vasiliy Kulikov <segoon@openwall.com> > > hslot was used for debugging purposes here. > > > BTW, what gcc version do you use? I have no warning with 4.4.3 > (Ubuntu 4.4.3-4ubuntu5): > > $ make net/ipv4/ping.o > CHK include/linux/version.h > CHK include/generated/utsrelease.h > CALL scripts/checksyscalls.sh > CC net/ipv4/ping.o > $ > I got this warning with gcc-4.6.0 on a 32bit (x86) host -- 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
From: Eric Dumazet <eric.dumazet@gmail.com> Date: Mon, 23 May 2011 10:23:00 +0200 > net/ipv4/ping.c: In function ‘ping_v4_unhash’: > net/ipv4/ping.c:140:28: warning: variable ‘hslot’ set but not used > > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> > CC: Vasiliy Kulikov <segoon@openwall.com> Applied.
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 1f3bb11..9aaa671 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -137,9 +137,6 @@ static void ping_v4_unhash(struct sock *sk) struct inet_sock *isk = inet_sk(sk); pr_debug("ping_v4_unhash(isk=%p,isk->num=%u)\n", isk, isk->inet_num); if (sk_hashed(sk)) { - struct hlist_nulls_head *hslot; - - hslot = ping_hashslot(&ping_table, sock_net(sk), isk->inet_num); write_lock_bh(&ping_table.lock); hlist_nulls_del(&sk->sk_nulls_node); sock_put(sk);
net/ipv4/ping.c: In function ‘ping_v4_unhash’: net/ipv4/ping.c:140:28: warning: variable ‘hslot’ set but not used Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Vasiliy Kulikov <segoon@openwall.com> --- net/ipv4/ping.c | 3 --- 1 file changed, 3 deletions(-) -- 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