qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Bernhard Beschow <shentey@gmail.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org,
	"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Paul Burton" <paulburton@kernel.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH] hw/mips/boston: Initialize g_autofree pointers
Date: Sun, 5 Jun 2022 09:13:44 -0700	[thread overview]
Message-ID: <1584d6f0-4d8c-c72a-583d-e0690265c369@linaro.org> (raw)
In-Reply-To: <20220605151908.30566-1-shentey@gmail.com>

On 6/5/22 08:19, Bernhard Beschow wrote:
> Fixes compilation due to false positives with -Werror:
> 
>    In file included from /usr/include/glib-2.0/glib.h:114,
>                     from qemu/src/include/glib-compat.h:32,
>                     from qemu/src/include/qemu/osdep.h:144,
>                     from ../src/hw/mips/boston.c:20:
>    In function ‘g_autoptr_cleanup_generic_gfree’,
>        inlined from ‘boston_mach_init’ at ../src/hw/mips/boston.c:790:52:
>    /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: ‘dtb_load_data’ may be used uninitialized [-Werror=maybe-uninitialized]
>       28 |   g_free (*pp);
>          |   ^~~~~~~~~~~~
>    ../src/hw/mips/boston.c: In function ‘boston_mach_init’:
>    ../src/hw/mips/boston.c:790:52: note: ‘dtb_load_data’ was declared here
>      790 |             g_autofree const void *dtb_file_data, *dtb_load_data;
>          |                                                    ^~~~~~~~~~~~~
>    In function ‘g_autoptr_cleanup_generic_gfree’,
>      inlined from ‘boston_mach_init’ at ../src/hw/mips/boston.c:790:36:
>    /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: ‘dtb_file_data’ may be used uninitialized [-Werror=maybe-uninitialized]
>       28 |   g_free (*pp);
>          |   ^~~~~~~~~~~~
>    ../src/hw/mips/boston.c: In function ‘boston_mach_init’:
>    ../src/hw/mips/boston.c:790:36: note: ‘dtb_file_data’ was declared here
>      790 |             g_autofree const void *dtb_file_data, *dtb_load_data;
>          |                                    ^~~~~~~~~~~~~
>    cc1: all warnings being treated as errors
> 
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
>   hw/mips/boston.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2022-06-05 16:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-05 15:19 [PATCH] hw/mips/boston: Initialize g_autofree pointers Bernhard Beschow
2022-06-05 16:13 ` Richard Henderson [this message]
2022-06-06 15:04 ` Philippe Mathieu-Daudé via
2022-06-10 14:04 ` Philippe Mathieu-Daudé via
2022-06-11 15:27   ` Bernhard Beschow
2022-06-11 21:48     ` Philippe Mathieu-Daudé via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1584d6f0-4d8c-c72a-583d-e0690265c369@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=f4bug@amsat.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=paulburton@kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=shentey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).