mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
qom: fix objects with improper parent type
Some objects accidentally inherit ObjectClass instead of Object. They compile silently but may crash after downcasting. In this patch, we introduce a coccinelle script to find broken declarations and fix them manually with proper base type. Signed-off-by: Sergey Nizovtsev <snizovtsev@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
d9f24bf572
commit
22fb6eb571
5 changed files with 30 additions and 3 deletions
|
@ -19,7 +19,7 @@
|
|||
OBJECT_DECLARE_SIMPLE_TYPE(VmGenIdState, VMGENID)
|
||||
|
||||
struct VmGenIdState {
|
||||
DeviceClass parent_obj;
|
||||
DeviceState parent_obj;
|
||||
QemuUUID guid; /* The 128-bit GUID seen by the guest */
|
||||
uint8_t vmgenid_addr_le[8]; /* Address of the GUID (little-endian) */
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue