cvs commit: src/sys/sys queue.h

Dag-Erling Smørgrav des at
Sun Mar 5 00:43:35 PST 2006

Joseph Koshy <jkoshy at> writes:
> Maxime Henrion <mux at> writes:
> >   Log:
> >   Cast the pointer to void * before casting it back to struct type * in
> >   STAILQ_LAST.  This quiets a warning from GCC about increased required
> >   alignment for the cast.
> Doesn't this trade a compile time warning for a runtime fault on those
> architectures where alignment matters?

Unless the stailq head has been corrupted, we know that the result of
the expression is correctly aligned for a pointer to struct type.

Dag-Erling Smørgrav - des at

More information about the cvs-src mailing list