diff options
author | jilles <jilles@FreeBSD.org> | 2011-04-17 16:04:39 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-04-17 16:04:39 +0000 |
commit | 933648d638b9e6ad349de688d2137a3353d4ef9c (patch) | |
tree | ef3d83b22ff78c9cdcca3bd033c418a2b32c5032 /contrib/dialog/samples/programbox2 | |
parent | 581206dfd1dc64a43afb04717dded328bd5c9ab2 (diff) | |
download | FreeBSD-src-933648d638b9e6ad349de688d2137a3353d4ef9c.zip FreeBSD-src-933648d638b9e6ad349de688d2137a3353d4ef9c.tar.gz |
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
Diffstat (limited to 'contrib/dialog/samples/programbox2')
0 files changed, 0 insertions, 0 deletions