On 01/21/2013 08:48 AM, Peter Maydell wrote: > On 14 January 2013 23:08, <fred.kon...@greensocs.com> wrote: >> +#define TYPE_VIRTIO_BUS "virtio-bus" >> +#define VIRTIO_BUS_GET_CLASS(obj) \ >> + OBJECT_GET_CLASS(VirtioBusClass, obj, TYPE_VIRTIO_BUS) >> +#define VIRTIO_BUS_CLASS(klass) \ >> + OBJECT_CLASS_CHECK(VirtioBusClass, klass, TYPE_VIRTIO_BUS) > > 'obj' and 'klass' need brackets round them, because they're > macro arguments.
Brackets are only necessary if the C parser could misinterpret things without the brackets; but in this particular case, there is no ambiguity (unless OBJECT_GET_CLASS() and OBJECT_CLASS_CHECK() are improperly under-parenthesized). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature