Date: Tue, 30 May 2017 19:54:22 +0200 From: Harry Schmalzbauer <freebsd@omnilan.de> To: "freebsd-net@freebsd.org" <freebsd-net@FreeBSD.org> Subject: tools/netmap/pkt-gen: clang error Message-ID: <592DB1CE.8000801@omnilan.de>
next in thread | raw e-mail | index | archive | help
Hello, after merging netmap code from head I can't compile pkt-gen from usr/src/tools/tools/netmap: cc -O2 -pipe -Werror -Wall -Wextra -march=ivybridge -g -std=gnu99 -fstack-protector-strong -Qunused-arguments -Qunused-arguments -std=gnu99 -fstack-protector-strong -Qunused-arguments -Qunused-arguments -c pkt-gen.c -o pkt-gen.o pkt-gen.c:650:19: error: taking address of packed member 'ip' of class or structure 'pkt' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] struct ip *ip = &pkt->ip; ^~~~~~~ pkt-gen.c:651:24: error: taking address of packed member 'udp' of class or structure 'pkt' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] struct udphdr *udp = &pkt->udp; ^~~~~~~~ pkt-gen.c:745:8: error: taking address of packed member 'ip' of class or structure 'pkt' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] ip = &pkt->ip; ^~~~~~~ pkt-gen.c:762:9: error: taking address of packed member 'udp' of class or structure 'pkt' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] udp = &pkt->udp; Quick hints highly appreciated. Thanks, -harry
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?592DB1CE.8000801>