[libvirt] [PATCH 2/2] m4: Don't suggest attribute malloc

Peter Krempa pkrempa at redhat.com
Fri Oct 18 08:40:34 UTC 2019


On Fri, Oct 18, 2019 at 10:16:50 +0200, Michal Privoznik wrote:
> With glib inclusion, some of its functions have
> __attribute__((__malloc__)) which make compiler realize we want
> to use the same attribute for some trivial functions of ours. For
> instance qemuDomainManagedSavePath(). I don't see any real
> benefit into using the attribute, so disable that suggestion.
> 
> In fact, wrong use of the attribute may lead to mysterious bugs:
> 
>   https://gitlab.gnome.org/GNOME/glib/issues/1465
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  m4/virt-compile-warnings.m4 | 1 +
>  1 file changed, 1 insertion(+)

ACK




More information about the libvir-list mailing list