qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 00/22] -Werror=maybe-uninitialized fixes


From: Daniel P . Berrangé
Subject: Re: [PATCH v2 00/22] -Werror=maybe-uninitialized fixes
Date: Tue, 24 Sep 2024 15:08:35 +0200
User-agent: Mutt/2.2.12 (2023-09-09)

On Tue, Sep 24, 2024 at 05:05:31PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Hi,
> 
> Depending on -Doptimization=<value>, GCC (14.2.1 here) produces different
> maybe-uninitialized warnings:
> - g: produces -Werror=maybe-uninitialized errors
> - 0: clean build
> - 1: produces -Werror=maybe-uninitialized errors
> - 2: clean build
> - 3: produces few -Werror=maybe-uninitialized errors
> - s: produces -Werror=maybe-uninitialized errors
> 
> Most are false-positive, because prior LOCK_GUARD should guarantee an
> initialization path. Few of them are a bit trickier. Finally, I found
> a potential related memory leak.

In addition we now build with "-ftrivial-auto-var-init=zero", so
any case which is missing an "= NULL" or "= 0"  initialization is
protected.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]