]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Use VIR_ALLOC_VAR instead of VIR_ALLOC_N for creating virObject
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 3 Apr 2013 13:14:23 +0000 (14:14 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 8 Apr 2013 09:03:21 +0000 (10:03 +0100)
commitc4f9edf1a1efda21271f6cf5d08e574548488a3f
tree404bfeb2ead1e598f2eeafa37056bdc33f4ac6ff
parente95de74d4c6eac821b666ae706e8fc002ca688d1
Use VIR_ALLOC_VAR instead of VIR_ALLOC_N for creating virObject

The current way virObject instances are allocated using
VIR_ALLOC_N causes alignment warnings

util/virobject.c: In function 'virObjectNew':
util/virobject.c:195:11: error: cast increases required alignment of target type [-Werror=cast-align]

Changing to use VIR_ALLOC_VAR will avoid the need todo
the casts entirely.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/virobject.c