[libvirt] [PATCH 1/2] virdbus: don't force users to pass int for bool values
Eric Blake
eblake at redhat.com
Mon Nov 24 16:21:11 UTC 2014
On 11/24/2014 02:43 AM, Ian Campbell wrote:
>>>>
>>>> I think this change breaks build on FreeBSD:
>>>>
>>>> CC util/libvirt_util_la-virdbus.lo
>>>> util/virdbus.c:956:13: error: cast from 'bool *' to 'dbus_bool_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Werror,-Wcast-align]
>>>> GET_NEXT_VAL(dbus_bool_t, bool_val, bool, "%d");
>>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> util/virdbus.c:858:17: note: expanded from macro 'GET_NEXT_VAL'
>>>> x = (dbustype *)(*xptrptr + (*narrayptr - 1)); \
>>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
>>>
>>> Valid complaint, so I'll have to figure something out to avoid it. :(
> I'm, guessing that this is the same underlying issue as:
> util/virdbus.c: In function 'virDBusMessageIterDecode':
> util/virdbus.c:956:346: error: cast increases required alignment of target type [-Werror=cast-align]
Yes.
>
> which we are seeing in the Xen automated tests [0, 1] (on armhf only,
> probably compiler dependent?).
So, do I have an ACK on my proposed fix yet? :)
https://www.redhat.com/archives/libvir-list/2014-November/msg00838.html
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141124/50cd30e5/attachment-0001.sig>
More information about the libvir-list
mailing list