Make dst_addr a "const void *" to squelch
taking address of packed member 'ip6_dst' of class or structure
'ip6_hdr' may result in an unaligned pointer value
[-Waddress-of-packed-member]
warnings from some versions of Clang.
const u_char *cp;
int advance;
u_int nh;
- const struct in6_addr *dst_addr;
+ const void *dst_addr;
const struct ip6_rthdr *dp;
const struct ip6_rthdr0 *dp0;
const struct in6_addr *addr;
cp = (const u_char *)ip6;
advance = sizeof(struct ip6_hdr);
nh = ip6->ip6_nxt;
- dst_addr = &ip6->ip6_dst;
+ dst_addr = (const void *)&ip6->ip6_dst;
while (cp < ndo->ndo_snapend) {
cp += advance;
if ((const u_char *)(addr + 1) > ndo->ndo_snapend)
goto trunc;
- dst_addr = addr;
+ dst_addr = (const void *)addr;
addr++;
}
break;