[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] hw/ppc/ppc405_boards: Initialize g_autofree pointer
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2] hw/ppc/ppc405_boards: Initialize g_autofree pointer |
Date: |
Tue, 5 Apr 2022 13:42:17 +0100 |
On Tue, 5 Apr 2022 at 13:40, Bernhard Beschow <shentey@gmail.com> wrote:
>
> Resolves the only compiler warning when building a full QEMU under Arch Linux:
>
> Compiling C object libqemu-ppc-softmmu.fa.p/hw_ppc_ppc405_boards.c.o
> In file included from /usr/include/glib-2.0/glib.h:114,
> from qemu/include/glib-compat.h:32,
> from qemu/include/qemu/osdep.h:132,
> from ../src/hw/ppc/ppc405_boards.c:25:
> ../src/hw/ppc/ppc405_boards.c: In function ‘ref405ep_init’:
> /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: warning: ‘filename’
> may be used uninitialized in this function [-Wmaybe-uninitialized]
> 28 | g_free (*pp);
> | ^~~~~~~~~~~~
> ../src/hw/ppc/ppc405_boards.c:265:26: note: ‘filename’ was declared here
> 265 | g_autofree char *filename;
> | ^~~~~~~~
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM