mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
include/hw/qdev-core: Detect most empty Property lists at compile time
Add a macro expansion of device_class_set_props which can check on the type and size of PROPS before calling the function. Avoid the macro in migration.c because migration_properties is defined externally with indeterminate size. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-13-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
2885bf891a
commit
588611972f
3 changed files with 19 additions and 2 deletions
|
@ -1061,7 +1061,7 @@ static void qdev_class_add_legacy_property(DeviceClass *dc, const Property *prop
|
|||
NULL, NULL, (Property *)prop);
|
||||
}
|
||||
|
||||
void device_class_set_props(DeviceClass *dc, const Property *props)
|
||||
void (device_class_set_props)(DeviceClass *dc, const Property *props)
|
||||
{
|
||||
const Property *prop;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue