Re: [spice-server PATCH v2 09/10] smartcard: use SPICE_ALIGNED_CAST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: pgpTSDecXyp5p.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]