From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: Chen Qun <kuhn.chenqun@huawei.com>,
Denis Plotnikov <dplotnikov@virtuozzo.com>,
Richard Henderson <richard.henderson@linaro.org>,
Euler Robot <euler.robot@huawei.com>
Subject: Re: [PATCH v1 7/7] gdbstub: fix compiler complaining
Date: Fri, 27 Mar 2020 11:56:47 +0100 [thread overview]
Message-ID: <25bba445-f6a0-d73e-e06b-142af14c51a1@redhat.com> (raw)
In-Reply-To: <20200327094945.23768-8-alex.bennee@linaro.org>
On 3/27/20 10:49 AM, Alex Bennée wrote:
> From: Denis Plotnikov <dplotnikov@virtuozzo.com>
>
> ./gdbstub.c: In function ‘handle_query_thread_extra’:
> /usr/include/glib-2.0/glib/glib-autocleanups.h:28:10:
> error: ‘cpu_name’ may be used uninitialized in this function
> [-Werror=maybe-uninitialized]
> g_free (*pp);
> ^
> ./gdbstub.c:2063:26: note: ‘cpu_name’ was declared here
> g_autofree char *cpu_name;
> ^
> cc1: all warnings being treated as errors
>
> Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
> Message-Id: <20200326151407.25046-1-dplotnikov@virtuozzo.com>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Reported-by: Chen Qun <kuhn.chenqun@huawei.com>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> gdbstub.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gdbstub.c b/gdbstub.c
> index 013fb1ac0f1..171e1509509 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -2060,8 +2060,8 @@ static void handle_query_thread_extra(GdbCmdContext *gdb_ctx, void *user_ctx)
> /* Print the CPU model and name in multiprocess mode */
> ObjectClass *oc = object_get_class(OBJECT(cpu));
> const char *cpu_model = object_class_get_name(oc);
> - g_autofree char *cpu_name;
> - cpu_name = object_get_canonical_path_component(OBJECT(cpu));
> + g_autofree char *cpu_name =
> + object_get_canonical_path_component(OBJECT(cpu));
> g_string_printf(rs, "%s %s [%s]", cpu_model, cpu_name,
> cpu->halted ? "halted " : "running");
> } else {
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
next prev parent reply other threads:[~2020-03-27 10:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 9:49 [PATCH for 5.0 v1 0/7] A selection of sanitiser fixes Alex Bennée
2020-03-27 9:49 ` [PATCH v1 1/7] elf-ops: bail out if we have no function symbols Alex Bennée
2020-03-27 10:53 ` Philippe Mathieu-Daudé
2020-03-27 11:10 ` Philippe Mathieu-Daudé
2020-03-27 11:45 ` Peter Maydell
2020-03-27 22:09 ` Richard Henderson
2020-03-27 9:49 ` [PATCH v1 2/7] linux-user: protect fcntl64 with an #ifdef Alex Bennée
2020-03-27 10:40 ` Laurent Vivier
2020-03-27 22:10 ` Richard Henderson
2020-03-27 9:49 ` [PATCH v1 3/7] tests/tcg: remove extraneous pasting macros Alex Bennée
2020-03-27 10:54 ` Philippe Mathieu-Daudé
2020-03-27 22:11 ` Richard Henderson
2020-03-27 9:49 ` [PATCH v1 4/7] linux-user: more debug for init_guest_space Alex Bennée
2020-03-27 10:50 ` Laurent Vivier
2020-03-27 9:49 ` [PATCH v1 5/7] fpu/softfloat: avoid undefined behaviour when normalising empty sigs Alex Bennée
2020-03-27 10:09 ` Peter Maydell
2020-03-27 22:27 ` Richard Henderson
2020-03-27 22:33 ` Peter Maydell
2020-03-27 10:13 ` Aleksandar Markovic
2020-03-27 10:31 ` Alex Bennée
2020-03-27 9:49 ` [PATCH v1 6/7] target/xtensa: add FIXME for translation memory leak Alex Bennée
2020-03-27 9:49 ` [PATCH v1 7/7] gdbstub: fix compiler complaining Alex Bennée
2020-03-27 10:56 ` Philippe Mathieu-Daudé [this message]
2020-03-27 10:53 ` [PATCH for 5.0 v1 0/7] A selection of sanitiser fixes no-reply
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=25bba445-f6a0-d73e-e06b-142af14c51a1@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=dplotnikov@virtuozzo.com \
--cc=euler.robot@huawei.com \
--cc=kuhn.chenqun@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).