[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v3 06/12] gdbstub: fix compiler complaining
From: |
Chenqun (kuhn) |
Subject: |
RE: [PATCH v3 06/12] gdbstub: fix compiler complaining |
Date: |
Mon, 6 Apr 2020 10:21:42 +0000 |
>-----Original Message-----
>From: Alex Bennée [mailto:address@hidden]
>Sent: Saturday, April 4, 2020 3:12 AM
>To: address@hidden
>Cc: Denis Plotnikov <address@hidden>; Euler Robot
><address@hidden>; Chenqun (kuhn) <address@hidden>;
>Richard Henderson <address@hidden>; Alex Bennée
><address@hidden>; Philippe Mathieu-Daudé <address@hidden>
>Subject: [PATCH v3 06/12] gdbstub: fix compiler complaining
>
>From: Denis Plotnikov <address@hidden>
>
> ./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 <address@hidden>
>Message-Id: <address@hidden>
>Reported-by: Euler Robot <address@hidden>
>Reported-by: Chen Qun <address@hidden>
>Reviewed-by: Richard Henderson <address@hidden>
>Signed-off-by: Alex Bennée <address@hidden>
>Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
>---
Add Miroslav Rezanina's "Reviewed-by" tag.
https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg07651.html
Reviewed-by: Miroslav Rezanina <address@hidden>
Thanks.
> 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 {
>--
>2.20.1
- [PATCH v3 for 5.0-rc2 00/12] a selection of random fixes, Alex Bennée, 2020/04/03
- [PATCH v3 01/12] elf-ops: bail out if we have no function symbols, Alex Bennée, 2020/04/03
- [PATCH v3 03/12] tests/tcg: remove extraneous pasting macros, Alex Bennée, 2020/04/03
- [PATCH v3 02/12] linux-user: protect fcntl64 with an #ifdef, Alex Bennée, 2020/04/03
- [PATCH v3 06/12] gdbstub: fix compiler complaining, Alex Bennée, 2020/04/03
- RE: [PATCH v3 06/12] gdbstub: fix compiler complaining,
Chenqun (kuhn) <=
- [PATCH v3 07/12] softfloat: Fix BAD_SHIFT from normalizeFloatx80Subnormal, Alex Bennée, 2020/04/03
- [PATCH v3 08/12] linux-user: factor out reading of /proc/self/maps, Alex Bennée, 2020/04/03
- [PATCH v3 04/12] linux-user: more debug for init_guest_space, Alex Bennée, 2020/04/03
- [PATCH v3 05/12] target/xtensa: add FIXME for translation memory leak, Alex Bennée, 2020/04/03
- [PATCH v3 10/12] target/arm: don't expose "ieee_half" via gdbstub, Alex Bennée, 2020/04/03
- [PATCH v3 09/12] linux-user: clean-up padding on /proc/self/maps, Alex Bennée, 2020/04/03
- [PATCH v3 12/12] configure: Add -Werror to PIE probe, Alex Bennée, 2020/04/03