diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-07-22 13:24:15 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-07-22 13:24:15 -0700 |
commit | 4bce81542cd16110ff5a95bfc428b876910ac851 (patch) | |
tree | 99bc3ab29814ca2834723085297bf729a716cb76 /print-ip6.c | |
parent | f92b6812d0e114960225f187a8788be137ce587b (diff) | |
download | tcpdump-4bce81542cd16110ff5a95bfc428b876910ac851.tar.gz |
Squelch some alignment warnings.
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.
Diffstat (limited to 'print-ip6.c')
-rw-r--r-- | print-ip6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/print-ip6.c b/print-ip6.c index 9f590f2a..0075fcea 100644 --- a/print-ip6.c +++ b/print-ip6.c @@ -50,7 +50,7 @@ ip6_finddst(netdissect_options *ndo, struct in6_addr *dst, 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; @@ -59,7 +59,7 @@ ip6_finddst(netdissect_options *ndo, struct in6_addr *dst, 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; @@ -112,7 +112,7 @@ ip6_finddst(netdissect_options *ndo, struct in6_addr *dst, if ((const u_char *)(addr + 1) > ndo->ndo_snapend) goto trunc; - dst_addr = addr; + dst_addr = (const void *)addr; addr++; } break; |