Re: [libvirt] [PATCH 1/2] virdbus: don't force users to pass int for bool values

2014-11-24 Thread Eric Blake
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 >>

Re: [libvirt] [PATCH 1/2] virdbus: don't force users to pass int for bool values

2014-11-24 Thread Ian Campbell
On Fri, 2014-11-21 at 17:16 -0700, Eric Blake wrote: > On 11/20/2014 04:17 PM, Eric Blake wrote: > > On 11/20/2014 08:12 AM, Conrad Meyer wrote: > >> Hi Eric, > >> > >> I think this change breaks build on FreeBSD: > >> > >> CC util/libvirt_util_la-virdbus.lo > >> util/virdbus.c:956:13: erro

Re: [libvirt] [PATCH 1/2] virdbus: don't force users to pass int for bool values

2014-11-21 Thread Eric Blake
On 11/20/2014 04:17 PM, Eric Blake wrote: > On 11/20/2014 08:12 AM, Conrad Meyer wrote: >> Hi Eric, >> >> 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 *') i

Re: [libvirt] [PATCH 1/2] virdbus: don't force users to pass int for bool values

2014-11-20 Thread Eric Blake
On 11/20/2014 08:12 AM, Conrad Meyer wrote: > Hi Eric, > > 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 > [-Werr

Re: [libvirt] [PATCH 1/2] virdbus: don't force users to pass int for bool values

2014-11-20 Thread Conrad Meyer
Hi Eric, 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_

Re: [libvirt] [PATCH 1/2] virdbus: don't force users to pass int for bool values

2014-11-20 Thread Daniel P. Berrange
On Wed, Nov 19, 2014 at 02:42:51PM -0700, Eric Blake wrote: > On 11/17/2014 05:36 PM, Eric Blake wrote: > > Use of an 'int' to represent a 'bool' value is confusing. Just > > because dbus made the mistake of cementing their 4-byte wire > > format of dbus_bool_t into their API doesn't mean we have

Re: [libvirt] [PATCH 1/2] virdbus: don't force users to pass int for bool values

2014-11-19 Thread Eric Blake
On 11/17/2014 05:36 PM, Eric Blake wrote: > Use of an 'int' to represent a 'bool' value is confusing. Just > because dbus made the mistake of cementing their 4-byte wire > format of dbus_bool_t into their API doesn't mean we have to > repeat the mistake. With a little bit of finesse, we can > gua

[libvirt] [PATCH 1/2] virdbus: don't force users to pass int for bool values

2014-11-17 Thread Eric Blake
Use of an 'int' to represent a 'bool' value is confusing. Just because dbus made the mistake of cementing their 4-byte wire format of dbus_bool_t into their API doesn't mean we have to repeat the mistake. With a little bit of finesse, we can guarantee that we provide a large-enough value to the D