diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2024-12-18 07:42:39 -0600 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-19 19:33:37 +0100 |
| commit | 588611972f774cacf2e15c73e3d61b54929c0528 (patch) | |
| tree | 510efbc5908a87608df9a52973886bd2f5c18f84 /hw/core/qdev-properties.c | |
| parent | 2885bf891ac2630f6847829e02b984e4a828309b (diff) | |
| download | focaccia-qemu-588611972f774cacf2e15c73e3d61b54929c0528.tar.gz focaccia-qemu-588611972f774cacf2e15c73e3d61b54929c0528.zip | |
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>
Diffstat (limited to 'hw/core/qdev-properties.c')
| -rw-r--r-- | hw/core/qdev-properties.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 315196bd85..de618a964a 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -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; |