[Spice-devel] [spice-server PATCH v2 09/10] smartcard: use SPICE_ALIGNED_CAST
Victor Toso
victortoso at redhat.com
Mon Aug 24 05:16:56 PDT 2015
Hi,
On Mon, Aug 24, 2015 at 02:10:59PM +0200, Christophe Fergeau wrote:
> On Fri, Aug 14, 2015 at 06:24:30PM +0200, Victor Toso wrote:
> > In order to avoid false posive alignment warnings
> > clang:
> > smartcard.c:131:29: error: cast from 'uint8_t *' (aka 'unsigned char *')
> > to 'VSCMsgHeader *' (aka 'struct VSCMsgHeader *') increases required
> > alignment from 1 to 4 [-Werror,-Wcast-align]
> >
> > VSCMsgHeader *vheader = (VSCMsgHeader*)state->buf;
>
> You should explain why this is aligned despite what the compiler
> says/thinks.
>
> Christophe
Okay, will do.
More information about the Spice-devel
mailing list