[libvirt PATCH 0/4] Reinstate -Wunused-but-set-variable

Michal Prívozník mprivozn at redhat.com
Mon Sep 6 15:22:47 UTC 2021


On 9/4/21 9:25 PM, Ján Tomko wrote:
> Personally, I feel like all the cases caught by new Clang's -Wunused-but-set-variable
> behavior were also unnecessarily difficult to read for humans, we should be more obvious
> when relying purely on side effects of g_auto and the warning is worth
> keeping.
> 
> Even if not, the first two patches should not be controversial.
> 
> Ján Tomko (4):
>   qemu: remove unused 'cfg' variables
>   util: virIdentitySetCurrent: only unref the old identity on success
>   rpc: mark source returned by virEventGLibAddSocketWatch as unused
>   Revert "meson: avoid bogus warnings from clang and g_autoptr"
> 
>  build-aux/syntax-check.mk |  2 +-
>  meson.build               | 21 ---------------------
>  src/qemu/qemu_driver.c    |  9 ---------
>  src/rpc/virnetclient.c    |  6 +++---
>  src/util/viridentity.c    |  4 +++-
>  5 files changed, 7 insertions(+), 35 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn at redhat.com>

Michal




More information about the libvir-list mailing list