Date: Sun, 17 Apr 2011 16:04:39 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/sys socket.h Message-ID: <201104171604.p3HG4qsj094757@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jilles 2011-04-17 16:04:39 UTC
FreeBSD src repository
Modified files:
sys/sys socket.h
Log:
SVN rev 220742 on 2011-04-17 16:04:39Z by jilles
Allow using CMSG_NXTHDR with -Wcast-align.
If various checks are omitted, the CMSG_NXTHDR macro expands to
(struct cmsghdr *)((char *)(cmsg) + \
_ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len))
Although there is no alignment problem (assuming cmsg is properly aligned
and _ALIGN is correct), this violates -Wcast-align on strict-alignment
architectures. Therefore an intermediate cast to void * is appropriate here.
There is no workaround other than not using -Wcast-align.
MFC after: 2 weeks
Revision Changes Path
1.107 +1 -1 src/sys/sys/socket.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104171604.p3HG4qsj094757>
