From 8f9ed29e2cf7eafc6ae4e0cd698f03ce2f635fe6 Mon Sep 17 00:00:00 2001 From: Jan Vaclav Date: Thu, 15 Feb 2024 13:51:40 +0100 Subject: [PATCH] libnm: allow _nm_setting_property_define_direct_strv() to be used as expression This is so that the resulting index can be used for aliasing properties. --- src/libnm-core-impl/nm-setting-private.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libnm-core-impl/nm-setting-private.h b/src/libnm-core-impl/nm-setting-private.h index 55bf9efd11..013c78ac64 100644 --- a/src/libnm-core-impl/nm-setting-private.h +++ b/src/libnm-core-impl/nm-setting-private.h @@ -877,8 +877,7 @@ _nm_properties_override(GArray *properties_override, const NMSettInfoProperty *p private_struct_type, \ private_struct_field, \ ... /* extra NMSettInfoProperty fields */) \ - G_STMT_START \ - { \ + ({ \ GParamSpec *_param_spec; \ \ G_STATIC_ASSERT(!NM_FLAGS_ANY((param_flags), ~(NM_SETTING_PARAM_FUZZY_IGNORE))); \ @@ -900,8 +899,7 @@ _nm_properties_override(GArray *properties_override, const NMSettInfoProperty *p private_struct_type, \ private_struct_field), \ __VA_ARGS__); \ - } \ - G_STMT_END + }) /*****************************************************************************/