[PATCH net-next] selftests: net: Clean up an unused variable

Subsystems: kernel selftest framework, networking [general], the rest

STALE2895d

2 messages, 2 authors, 2018-10-06 · open the first message on its own page

[PATCH net-next] selftests: net: Clean up an unused variable

From: Jakub Sitnicki <jakub@cloudflare.com>
Date: 2018-10-05 15:17:37

Address compiler warning:

ip_defrag.c: In function 'send_udp_frags':
ip_defrag.c:206:16: warning: unused variable 'udphdr' [-Wunused-variable]
  struct udphdr udphdr;
                ^~~~~~

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
---
 tools/testing/selftests/net/ip_defrag.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/net/ip_defrag.c b/tools/testing/selftests/net/ip_defrag.c
index 2366dc6bce71..61ae2782388e 100644
--- a/tools/testing/selftests/net/ip_defrag.c
+++ b/tools/testing/selftests/net/ip_defrag.c
@@ -203,7 +203,6 @@ static void send_udp_frags(int fd_raw, struct sockaddr *addr,
 {
 	struct ip *iphdr = (struct ip *)ip_frame;
 	struct ip6_hdr *ip6hdr = (struct ip6_hdr *)ip_frame;
-	struct udphdr udphdr;
 	int res;
 	int offset;
 	int frag_len;
-- 
2.17.1

Re: [PATCH net-next] selftests: net: Clean up an unused variable

From: David Miller <davem@davemloft.net>
Date: 2018-10-06 04:54:36

From: Jakub Sitnicki <jakub@cloudflare.com>
Date: Fri,  5 Oct 2018 10:19:57 +0200
Address compiler warning:

ip_defrag.c: In function 'send_udp_frags':
ip_defrag.c:206:16: warning: unused variable 'udphdr' [-Wunused-variable]
  struct udphdr udphdr;
                ^~~~~~

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help