[Spice-devel] [spice-server PATCH v2 09/10] smartcard: use SPICE_ALIGNED_CAST
Christophe Fergeau
cfergeau at redhat.com
Mon Aug 24 05:10:59 PDT 2015
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150824/048d629b/attachment.sig>
More information about the Spice-devel
mailing list