On 3/15/21 11:13 AM, mreza...@redhat.com wrote:
> From: Miroslav Rezanina <mreza...@redhat.com>
> 
> When declaring g_autofree variable without inicialization, compiler

Typo "initialization"

> will raise "may be used uninitialized in this function" warning due
> to automatic free handling.
> 
> This is mentioned in docs/devel/style.rst (quote from section
> "Automatic memory deallocation"):
> 
>   * Variables declared with g_auto* MUST always be initialized,
>     otherwise the cleanup function will use uninitialized stack memory
> 
> Add inicialization for these declarations to prevent the warning and

"initialization"

> comply with coding style.
> 
> Signed-off-by: Miroslav Rezanina <mreza...@redhat.com>
> 
> ---
> * v3:
>   -- allocate in s390_pci_update_dma_avail instead of NULL init
> 
> * v2:
>   -- Removed fixes in hw/remote/memory.c and hw/remote/proxy.c
>      fixed by patch sent by Zenghui Yu (multi-process: Initialize
>      variables declared with g_auto*)
> ---
>  hw/s390x/s390-pci-vfio.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)

Maybe "hw/s390x/s390-pci-vfio" prefix in subject?

Otherwise:
Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>


Reply via email to