Skip to content

Commit 0e063a5

Browse files
committed
libvirt: silence inlining warning
We silence the following warning about inlining cleanup methods of the glib: libvirt> /nix/store/0784w06097k9i46zipgjf05l87i19jj0-glib-2.84.3-dev/include/glib-2.0/glib/gmacros.h:1342:43: warning: inlining failed in call to 'glib_autoptr_cleanup_virNetlinkMsg': call is unlikely and code size would grow [-Winline] libvirt> 1342 | #define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName libvirt> | ^~~~~~~~~~~~~~~~~~~~~ libvirt> /nix/store/0784w06097k9i46zipgjf05l87i19jj0-glib-2.84.3-dev/include/glib-2.0/glib/gmacros.h:1362:36: note: in expansion of macro '_GLIB_AUTOPTR_FUNC_NAME' libvirt> 1362 | static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_FUNC_NAME(TypeName) (TypeName **_ptr) \ libvirt> | ^~~~~~~~~~~~~~~~~~~~~~~ libvirt> /nix/store/0784w06097k9i46zipgjf05l87i19jj0-glib-2.84.3-dev/include/glib-2.0/glib/gmacros.h:1379:3: note: in expansion of macro '_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS' libvirt> 1379 | _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS(TypeName, TypeName, func) libvirt> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libvirt> ../src/util/virnetlink.h:31:1: note: in expansion of macro 'G_DEFINE_AUTOPTR_CLEANUP_FUNC' libvirt> 31 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetlinkMsg, nlmsg_free); libvirt> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libvirt> ../src/util/virnetlink.c:791:30: note: called from here libvirt> 791 | g_autoptr(virNetlinkMsg) nl_msg = NULL; On-behalf-of: SAP stefan.kober@sap.com
1 parent eb0d595 commit 0e063a5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/common.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ in
217217
"-Ddriver_vz=disabled"
218218
"-Db_sanitize=leak"
219219
"-Db_sanitize=address,undefined"
220+
# Enabling the sanitizers has led to warnings about inlining macro
221+
# generated cleanup methods of the glib which spam the build log.
222+
# Ignoring and suppressing the warnings seems like the only option.
223+
# "warning: inlining failed in call to 'glib_autoptr_cleanup_virNetlinkMsg': call is unlikely and code size would grow [-Winline]"
224+
"-Dc_args=-Wno-inline"
220225
];
221226
});
222227
};

0 commit comments

Comments
 (0)