Re: [head tinderbox] failure on ia64/ia64

From: Jilles Tjoelker <jilles_at_stack.nl>
Date: Tue, 1 Feb 2011 22:50:42 +0100
On Tue, Feb 01, 2011 at 09:18:44AM +0100, Pawel Jakub Dawidek wrote:
> Still, I'm more concerned with CMSG_NXTHDR() macro, which from what I
> see might not be fixed by casting arguments.

Yes, without various checks it 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. Therefore I
think an intermediate cast to void * would be appropriate here.

-- 
Jilles Tjoelker
Received on Tue Feb 01 2011 - 20:50:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:11 UTC