On Mon, Sep 14, 2026 at 02:54:36PM +0200, Peter Krempa via Devel wrote:
> From: Peter Krempa <[email protected]>
> 
> Both 'sigErrors' and 'sigLastErrno' are only written to since their
> inception in commit 4e00b1da8a85401652031e0125477d72bfad3502.
> 
> This was caught by clang on Fedora Rawhide:
> 
> clang -Isrc/rpc/libvirt_net_rpc_server.a.p -Isrc/rpc -I../src/rpc -Isrc/util 
> -I../src/util -Iinclude -I../include -Isrc -I../src -I. -I.. 
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include 
> -I/usr/include/sysprof-6 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount 
> -I/usr/include/blkid -I/usr/include/libxml2 -I/usr/include/tirpc 
> -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra 
> -std=gnu99 -O2 -g @/builds/libvirt/libvirt/build/c-warnings.txt -fPIC 
> -DWITH_GZFILEOP -pthread -MD -MQ 
> src/rpc/libvirt_net_rpc_server.a.p/virnetdaemon.c.o -MF 
> src/rpc/libvirt_net_rpc_server.a.p/virnetdaemon.c.o.d -o 
> src/rpc/libvirt_net_rpc_server.a.p/virnetdaemon.c.o -c 
> ../src/rpc/virnetdaemon.c
> ../src/rpc/virnetdaemon.c:552:21: error: variable 'sigErrors' set but not 
> used [-Werror,-Wunused-but-set-global]
>   552 | static sig_atomic_t sigErrors;
>       |                     ^
> ../src/rpc/virnetdaemon.c:553:12: error: variable 'sigLastErrno' set but not 
> used [-Werror,-Wunused-but-set-global]
>   553 | static int sigLastErrno;
>       |            ^
> 2 errors generated.
> 
> Remove the variables and code which guarded the writes to them.
> 
> Fixes: 4e00b1da8a85401652031e0125477d72bfad3502
> Signed-off-by: Peter Krempa <[email protected]>
> ---
>  src/rpc/virnetdaemon.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)

Reviewed-by: Daniel P. Berrangé <[email protected]>


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|

Reply via email to