On 05/18/2016 07:14 AM, Christophe Fergeau wrote: > On Wed, May 18, 2016 at 12:46:03PM +0300, Uri Lublin wrote: >> >> In man cmsg examples I see they use a pointer: >> int *pi = (int*) CMSG_DATA(cmsg); >> *fd = *pi; > > It seems to work this way, but I'm not sure why this works ;) > I read an excelent post from Thiago Macieira (Qt) about this types of warnings a long time ago, maybe it will make things clearer for you too... http://blog.qt.io/blog/2011/06/10/type-punning-and-strict-aliasing/ -- Eduardo de Barros Lima (Etrunko) Software Engineer - RedHat etrunko@xxxxxxxxxx _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel