summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: acce2ea)
raw | patch | inline | side by side (parent: acce2ea)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Tue, 9 Aug 2016 12:23:06 +0000 (14:23 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Tue, 9 Aug 2016 12:24:06 +0000 (14:24 +0200) |
utils_dns.c: In function ‘handle_ip’:
utils_dns.c:531:29: warning: pointer of type ‘void *’ used in arithmetic
[-Wpointer-arith]
memcpy(buf, (void *) ip + offset, len - offset);
^
utils_dns.c:531:29: warning: pointer of type ‘void *’ used in arithmetic
[-Wpointer-arith]
memcpy(buf, (void *) ip + offset, len - offset);
^
src/utils_dns.c | patch | blob | history |
diff --git a/src/utils_dns.c b/src/utils_dns.c
index f38a7bd1995d212f458d57136a52ac2edfa73d5d..3e80e8690efa3360c99a2e4a34509b93a76a23ca 100644 (file)
--- a/src/utils_dns.c
+++ b/src/utils_dns.c
return (0);
if (IPPROTO_UDP != ip->ip_p)
return 0;
- memcpy(buf, (void *) ip + offset, len - offset);
+ memcpy(buf, ((char *)ip) + offset, len - offset);
if (0 == handle_udp((struct udphdr *) buf, len - offset))
return 0;
return 1;