Skip to contentSkip to conversation

selftests: net: Clean up an unused variable

PATCH Applied Jakub Sitnicki 2 participants 2 messages Oct 5, 2018 – Oct 6, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: net: Clean up an unused variable

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;
                ^~~~~~
---
 tools/testing/selftests/net/ip_defrag.c | 1 -
 1 file changed, 1 deletion(-)
tools/testing/selftests/net/ip_defrag.c +0 -1
index 2366dc6bce71..61ae2782388e 100644
@@ -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;
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw

From: Jakub Sitnicki <[email protected]>
Date: Fri, 5 Oct 2018 10:19:57 +0200

Quoted 8 lines

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;
                ^~~~~~

Applied.