From patchwork Wed Apr 1 09:47:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 185140 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp331160ilr; Wed, 1 Apr 2020 02:51:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvalocy0BgNah6B9F/a/SfAoreDkVirNp9ZJ4HzLyvpdSj9NdS6Q56+0IBQO7LkmkuCuhT4 X-Received: by 2002:ac8:1b46:: with SMTP id p6mr9542044qtk.369.1585734699069; Wed, 01 Apr 2020 02:51:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585734699; cv=none; d=google.com; s=arc-20160816; b=Sn5BNHk51r12jpXdoUKIxJAoOZvD80goGqjmu40ITsb5G5Z1r0oz5CrBRpok5Ef5i1 6ChsdHYZ8VS8GcbQVOBHjRxWcScJsqS8jmJKyQuTHcOwXllbriTf7HI/wy0byurseV/6 txn8oCCN7gk5cxD32WZJjHSulta9n6BfNULE5oDr7Xe0BdCtQpyWmu9gZQ8pI5PbZO+3 0ABUzwY9e2FgLo7P8fuFA7FrhPTtp/Lwlm7zjKReUXeauWUgVGGhqkXcusHyuDuTJaOb 2M/3r3Ype5AeqZAPJ2KubRtUEUJE4JRRX3c7133JDjeyWjF6MGNh2BnWfuZb4d3k39lV G3uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=IiHiPfqSf5RxTYVWG0ZPN64iJbsFrXxtKKLhTgnCXm4=; b=ZfvRx+MmZtHFvXeMoaWtb0cNHrnIeefPt2iwd7SV1QuYjyioWnsa60xT+qpdF//viz IXhcDaiAMvGgTOJZutrZJC+wa468EpJWCrjVtj6wAfb2038OnzS6fIzilpyx3PJDk71D Q1hBxkteszDYrYh1Yt7xDRbzYMrB228b8CuPU155cFc3MtBxzjoIP9yrDHHzG6j4B0Tq E7oCxZDvPwaACn3JqvmDJwwEy8vmdY6RFsCmGQsaLazRf+B/ZDR1uNofO3B+dXAgR25F J/EXe7o2LoVCeQ+KS4JpEw4AjnHC4Z3HNjoI2ZW6FjR+CTBI8v6tQGL3b1MoJ1iTNgj8 KKNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=o4vYVVwe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v18si786911qvh.173.2020.04.01.02.51.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Apr 2020 02:51:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=o4vYVVwe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJa26-0002xi-Kq for patch@linaro.org; Wed, 01 Apr 2020 05:51:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38459) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJZym-0004L1-4T for qemu-devel@nongnu.org; Wed, 01 Apr 2020 05:48:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJZyl-0002CR-2W for qemu-devel@nongnu.org; Wed, 01 Apr 2020 05:48:12 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:39524) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJZyk-0002C7-Sj for qemu-devel@nongnu.org; Wed, 01 Apr 2020 05:48:11 -0400 Received: by mail-wm1-x333.google.com with SMTP id e9so6423010wme.4 for ; Wed, 01 Apr 2020 02:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IiHiPfqSf5RxTYVWG0ZPN64iJbsFrXxtKKLhTgnCXm4=; b=o4vYVVwe2EC92JvUXX3NUKM4/28QtjdplV4no0lfxCgy5M98elsMbsK8YZ5zMP/yfg joliNWhm17CbcgQB4JIY1CnM4Hj1r2DN0KOsKsDu3aS8NPQOItWNXuNSYXjvo1wJGvC8 Or+nm2PfUhzOgJZTbX/UVTtEBdBAGmWLgdwrIW9Yz42054i+5snn/YVHmcGMvYfXJhay peXWQF4v4cnMaPK2BPoZZc2ElSvndfyGiBguuQ+Y7KJQOxst+ZqAvbyU+tGX7dgjwTq+ Um2ZdyxuJHYOSef5AFF9yHm92WKrg7ubRZqQD2Lbct1jsYKouhOg8ItPN8cMiE0rxr7J qTgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IiHiPfqSf5RxTYVWG0ZPN64iJbsFrXxtKKLhTgnCXm4=; b=Dev5vlF7YWbb9xryKrwab7PCK9eZ6QdWvgf2wjcvoMAUN+m0wAL2O4xbACVadlJKfe 0DEmb7xfPtc57WhtNqqopCX2yHvO723vnF8dT+tv6bN5rOK0Xd69uPxjNqmEWZyRJyGm NrD/PWP+idx18ARUUcfH7WVOLHT4z2QrSUxqjcv8nF7slYIPfxp4hyNN5t1UZeLhBhXe 0uxtoFwswIQaI0QoerCusRz1otQ1l/NeikWwFIVyefeUCT1Kpbc9hLxGYFZPJoKu7p9k /Xfp78HpyK/u3wHAfU9BoGRYkkEnBeqXkPYuXUPBb2QFvrcj3JcQeM4+nD2lDadeObFp MknQ== X-Gm-Message-State: AGi0PuYRtMGt09l8kmXN9EjyIfxKQCY3NC/C4Ic2sZiIvN9U8o5C4zdn /bH0Ktgp6i+OvFi9GIL8mkxWYg== X-Received: by 2002:a1c:8193:: with SMTP id c141mr3330040wmd.14.1585734489788; Wed, 01 Apr 2020 02:48:09 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o9sm2184644wrx.48.2020.04.01.02.48.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 02:48:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 09BC91FF92; Wed, 1 Apr 2020 10:48:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 06/10] gdbstub: fix compiler complaining Date: Wed, 1 Apr 2020 10:47:55 +0100 Message-Id: <20200401094759.5835-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200401094759.5835-1-alex.bennee@linaro.org> References: <20200401094759.5835-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::333 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Denis Plotnikov , Euler Robot , Chen Qun , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Denis Plotnikov ./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 Message-Id: <20200326151407.25046-1-dplotnikov@virtuozzo.com> Reported-by: Euler Robot Reported-by: Chen Qun Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 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 {