[libvirt] [PATCH] object: require maximal alignment in base class

Eric Blake eblake at redhat.com
Fri Dec 13 13:01:25 UTC 2013


On 12/13/2013 03:22 AM, Michal Privoznik wrote:
> On 13.12.2013 00:07, Eric Blake wrote:
>> Recent changes to events (commit 8a29ffcf) resulted in new compile
>> failures on some targets (such as ARM OMAP5):
>> conf/domain_event.c: In function 'virDomainEventDispatchDefaultFunc':
>> conf/domain_event.c:1198:30: error: cast increases required alignment of
>> target type [-Werror=cast-align]

>> * src/util/virobject.h (_virObject): Use a union to ensure that
>> subclasses never have stricter alignment than the parent.
>> * src/util/virobject.c (virObjectNew, virObjectUnref)
>> (virObjectRef): Adjust clients.
>> * src/libvirt.c (virConnectRef, virDomainRef, virNetworkRef)
>> (virInterfaceRef, virStoragePoolRef, virStorageVolRef)
>> (virNodeDeviceRef, virSecretRef, virStreamRef, virNWFilterRef)
>> (virDomainSnapshotRef): Likewise.
>> * src/qemu/qemu_monitor.c (qemuMonitorOpenInternal)
>> (qemuMonitorClose): Likewise.
>>

> Beside the comment above union I got the same diff. I did compile check
> on my armv6l box and it passed.
> 
> ACK

Thanks for the testing; patch now pushed.

-- 
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: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131213/78ce9a5e/attachment-0001.sig>


More information about the libvir-list mailing list