Re: [libvirt PATCH v2] meson: avoid bogus warnings from clang and g_autoptr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 01, 2021 at 01:29:25PM +0100, Daniel P. Berrangé wrote:
> Clang has previously had trouble with G_DEFINE_AUTOPTR_CLEANUP_FUNC
> generated code, thinking it was unused. We turn off -Wunused-function
> to avoid tripping up on that with CLang.
> 
> New Clang has started having trouble with g_autoptr now too. In usage
> scenarios where the variable is set, but never again read, it thinks
> it is unused not realizing the destructor has useful side effects.
> For this we have to skip -Wunused-but-set-variable on CLang.
> 
> Reviewed-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  build-aux/syntax-check.mk |  2 +-
>  meson.build               | 21 +++++++++++++++++++++
>  2 files changed, 22 insertions(+), 1 deletion(-)

Reviewed-by: Pavel Hrdina <phrdina@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux