From nobody Fri Nov 14 05:12:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1585235735; cv=none; d=zohomail.com; s=zohoarc; b=jDOrrVkxChtPrs/4jlh6Nq47R152TlIXEdLSsUebs8/rEzEwbJ4zYCbCMmH1Kuwnt/qp1D4vSsnu2cWCg2ilcBZH0UNLLeHze1GjjpwZIdz31Qz55xXZvDzLFWKOF7+OBT4o7vjPPThg4xl0fMAsx9j58pC435+fCSoV6T7Bvzw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585235735; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=7uGt7tK50/aDNNdZYe5Z0v2/mNp63T38JXsAP/b9SGc=; b=iIEP76DjmXdr0EAEEPaGP22kgNjQUgSHSFRaBJmk7eFCP+s2NocN0VAxKo11ll8SPeGt8IxhN7ihd4vhKSXoxlMtGFC429Zmj8te6iiFT4oWji4LCOpVDi0qlSDFzPxeZcxwE35wXoYL1oVmeo/1sS7tnvLBW9tKMX4lKx36rLE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1585235735242680.7098970736923; Thu, 26 Mar 2020 08:15:35 -0700 (PDT) Received: from localhost ([::1]:55234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHUEH-000195-Ln for importer@patchew.org; Thu, 26 Mar 2020 11:15:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50716) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHUDc-0000h9-PX for qemu-devel@nongnu.org; Thu, 26 Mar 2020 11:14:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHUDa-0000Bx-O8 for qemu-devel@nongnu.org; Thu, 26 Mar 2020 11:14:51 -0400 Received: from relay.sw.ru ([185.231.240.75]:56052) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jHUDa-00009Y-Bt for qemu-devel@nongnu.org; Thu, 26 Mar 2020 11:14:50 -0400 Received: from dptest2.qa.sw.ru ([10.94.4.71]) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1jHUDO-00011Y-3L; Thu, 26 Mar 2020 18:14:38 +0300 From: Denis Plotnikov To: qemu-devel@nongnu.org Subject: [PATCH] gdbstub: fix compiler complaining Date: Thu, 26 Mar 2020 18:14:07 +0300 Message-Id: <20200326151407.25046-1-dplotnikov@virtuozzo.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: philmd@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" ./gdbstub.c: In function =E2=80=98handle_query_thread_extra=E2=80=99: /usr/include/glib-2.0/glib/glib-autocleanups.h:28:10: error: =E2=80=98cpu_name=E2=80=99 may be used uninitialized in this fun= ction [-Werror=3Dmaybe-uninitialized] g_free (*pp); ^ ./gdbstub.c:2063:26: note: =E2=80=98cpu_name=E2=80=99 was declared here g_autofree char *cpu_name; ^ cc1: all warnings being treated as errors Signed-off-by: Denis Plotnikov Reviewed-by: Richard Henderson --- gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 013fb1ac0f..171e150950 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 =3D object_get_class(OBJECT(cpu)); const char *cpu_model =3D object_class_get_name(oc); - g_autofree char *cpu_name; - cpu_name =3D object_get_canonical_path_component(OBJECT(cpu)); + g_autofree char *cpu_name =3D + object_get_canonical_path_component(OBJECT(cpu)); g_string_printf(rs, "%s %s [%s]", cpu_model, cpu_name, cpu->halted ? "halted " : "running"); } else { --=20 2.17.0