On 20.08.20 23:55, Eduardo Habkost wrote:
> While trying to convert TypeInfo declarations to the new
> OBJECT_DECLARE* macros, I've stumbled on a few suspicious cases
> where instance_size or class_size is not set, despite having type
> checker macros that use a specific type.
> 
> The ones with "WARNING" are abstract types (maybe not serious if
> subclasses set the appropriate sizes).  The ones with "ERROR"
> don't seem to be abstract types.
> 
> WARNING: hw/arm/armsse.c:1159:1: class_size should be set to 
> sizeof(ARMSSEClass)?
> WARNING: hw/audio/hda-codec.c:900:1: instance_size should be set to 
> sizeof(HDAAudioState)?
> ERROR: hw/core/register.c:328:1: instance_size should be set to 
> sizeof(RegisterInfo)?
> WARNING: hw/input/adb.c:310:1: class_size should be set to 
> sizeof(ADBDeviceClass)?
> WARNING: hw/isa/isa-superio.c:181:1: instance_size should be set to 
> sizeof(ISASuperIODevice)?
> WARNING: hw/ppc/pnv_lpc.c:771:1: instance_size should be set to 
> sizeof(PnvLpcController)?
> ERROR: hw/ppc/spapr_drc.c:771:1: instance_size should be set to 
> sizeof(SpaprDrc)?
> WARNING: hw/rtc/m48t59-isa.c:156:1: class_size should be set to 
> sizeof(M48txxISADeviceClass)?
> WARNING: hw/rtc/m48t59.c:691:1: class_size should be set to 
> sizeof(M48txxSysBusDeviceClass)?
> ERROR: hw/s390x/virtio-ccw.c:1237:1: class_size should be set to 
> sizeof(VirtioCcwBusClass)?

The parent of TYPE_VIRTIO_CCW_BUS is TYPE_VIRTIO_BUS.

typedef struct VirtioBusClass VirtioCcwBusClass;

So I guess the sizes match? Anyhow, setting doesn't hurt.

-- 
Thanks,

David / dhildenb


Reply via email to