Skip to contentSkip to conversation

Fix compiler warning in tcpdump.c

B.A.T.M.A.N. Andrew Lunn 1 participant 1 message Jul 17, 2009

lore
Share & tools
lore
#0 lore raw

Compiling batctl/tcpdump.c with gcc version 4.3.3 gives a compiler warning. Add a cast to fix this.

tcpdump.c +1 -1
Index: batctl/tcpdump.c
===================================================================
@@ -191,7 +191,7 @@
 
 		switch (ntohs(udphdr->dest)) {
 		case 67:
-			LEN_CHECK((size_t)buff_len - (iphdr->ihl * 4) - sizeof(struct udphdr), 44, "DHCP");
+                        LEN_CHECK((size_t)buff_len - (iphdr->ihl * 4) - sizeof(struct udphdr), (size_t) 44, "DHCP");
 			printf("%s.67: BOOTP/DHCP, Request from %s, length %zd\n",
 				inet_ntoa(*(struct in_addr *)&iphdr->daddr),
 				ether_ntoa_long((struct ether_addr *)(((char *)udphdr) + sizeof(struct udphdr) + 28)),