From patchwork Wed Oct 4 12:00:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 729303 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a4e:0:b0:31d:da82:a3b4 with SMTP id v14csp306924wrs; Wed, 4 Oct 2023 05:07:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHi8LxgdTR9IJAvxdCPECw3DWR+hI4cajvT91ZTwk7AC/ubSbXQGcoDRr22YyD5dzkSCfOq X-Received: by 2002:a05:622a:1d1:b0:417:b91b:e101 with SMTP id t17-20020a05622a01d100b00417b91be101mr2436915qtw.21.1696421265230; Wed, 04 Oct 2023 05:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696421265; cv=none; d=google.com; s=arc-20160816; b=grf18Spqd3zMT0PzyWJTCnod7CYp8Vij6S2cO2hedODXvkTUWN0KriPLfgHuUmzUEI qmupUy1Xi5s5tr6pH2LR65+2nPfffi+Rw7NZPgdCcz/FSO7GgTkkPtphBfgnq042bjYN wOtmcLZ8S069Cv27ftYsMH5NPeKwjMzRayglIokLOE0zggwxwmboJqfgDYFCGLs9SYre r+HMU57Qe6WRqx1DwfypUT3rJ0DYE7t/882ThPDhD7BorU5x+OYZRkNmcTWJ79xvLKoq IEdgv2u8hGMIDMLc3LWsSypMqPUs7Y9HylULpzMi1xJJ04KLijlJzgmHYx790dNKu/eE MGZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=S8wZ57nmGBju5vDKBp5SHeeONo30+tUOfUJLJWu5rBM=; fh=WqqjBKdRofj4eRAnrlE6cF/DwtqWEYNnnEv6JjVp+gM=; b=eP0DVLSjiHmv+YqzUYqqDIReKBMEL/a/BS4U2RBQyunl0ClnHgT8jwzwWgMl6o353m +4T1OPn03tx5slGpZZYTdgFTGBaJHs+A81VBMNefrEAx5ppfCTUFZDVfxhaaSTWEHk7N P6lblrImbwc9KqCRGXzyJZbS4IxKo0+OV4aFQtwvNhIO+czU6oIAncmT4Wo75fvf4er3 UUFXO555FuPbHq7HgQ7BlNmSAnDbQ/j50/8ACJlaWVIaI02tZmMgpwfFBHFui2Lr89nF oydEcGyrquPA125SMgqHrANsgxFntADKGLBhrI8h2AFOKOJiupjnMFMrMhJ9D3wT2fPi I2nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ASPt7McQ; 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=pass (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 m7-20020ac85b07000000b0041821adfb01si1414950qtw.632.2023.10.04.05.07.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Oct 2023 05:07:45 -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=pass header.i=@linaro.org header.s=google header.b=ASPt7McQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qo0bR-0003s4-NS; Wed, 04 Oct 2023 08:03:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qo0ZW-0000Sk-1B for qemu-devel@nongnu.org; Wed, 04 Oct 2023 08:01:57 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qo0ZT-00019H-3J for qemu-devel@nongnu.org; Wed, 04 Oct 2023 08:01:44 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3247cefa13aso1856535f8f.1 for ; Wed, 04 Oct 2023 05:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696420901; x=1697025701; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=S8wZ57nmGBju5vDKBp5SHeeONo30+tUOfUJLJWu5rBM=; b=ASPt7McQQhoErHzFzwBk8oTN7THDTc0MAKq5S0f7aWfy+v75jGvkk+zU7cshZne3X8 tJcxUoRN4zs4wTFyN7/T8jFo8Qcwwrv/cBnVaktOOsgzxlurJJd/aDghhUhqCFowKTWH 56NHZqTIMTCMncT1Bbxw+oOjnTGLHJxXBz70e/TagiBM5JbCJlIwVwaQGlgrtvkPyCk6 CbtUajBlmaUzve7Mc0Nie/Clbfm00G+lIlexVWvZ79Rc3zgTHU8DW90IzqnghEC6riBc OPhUgj2B62kNNGb+QBiZ+0AInDYAbPdJf/beh0bY+6OwaiPb2ND68eFUY9SJRNtfeGRG u4lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696420901; x=1697025701; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S8wZ57nmGBju5vDKBp5SHeeONo30+tUOfUJLJWu5rBM=; b=R58BULKq9w040ho7a11kdMTc4IwM75zzzsJJ9tGM6pm30GmJnAmsSJ/a39THwM+B8z LnlO+hQ75e9KkuDAPEc0FvntrOmMux/x3Er8T+iqnRrHsQtPig/jBGiFGcaij0DqLsJU CRyAiZA0bAbfJvryIp0B4Ou039oeykGZl7HfrMrHTMkJlGIfqdmquZkJQGRuxOW0ysxx Qmp51KS8EOgXuVrS4UzpCQqy/bVM7JzPstgCQnBeiemBGHIsA3xEXieZFPB3TugeRS6f sEbdaFTY18LKGNaWM6p5m92zNuezdLwjBGUYaW+CCxA5I5x/AmSR67nCQfy8b2OF+bFK jODA== X-Gm-Message-State: AOJu0YwStMe0CJaqEzn+fAjkIA+uzf+P1qcD+t3u02k36jqgRNGGhdcV 4xnw7ymls8qcxndP/WIrLlA5Z5OelK6NWRTK33w= X-Received: by 2002:adf:e6ce:0:b0:31f:b7b2:d4e1 with SMTP id y14-20020adfe6ce000000b0031fb7b2d4e1mr1846346wrm.20.1696420901110; Wed, 04 Oct 2023 05:01:41 -0700 (PDT) Received: from m1x-phil.lan (5ep85-h01-176-173-163-52.dslam.bbox.fr. [176.173.163.52]) by smtp.gmail.com with ESMTPSA id j14-20020a5d464e000000b0031f8a59dbeasm3816870wrs.62.2023.10.04.05.01.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Oct 2023 05:01:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= Subject: [PATCH v3 13/16] semihosting/arm-compat: Clean up local variable shadowing Date: Wed, 4 Oct 2023 14:00:16 +0200 Message-ID: <20231004120019.93101-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231004120019.93101-1-philmd@linaro.org> References: <20231004120019.93101-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fix: semihosting/arm-compat-semi.c: In function ‘do_common_semihosting’: semihosting/arm-compat-semi.c:379:13: warning: declaration of ‘ret’ shadows a previous local [-Wshadow=local] 379 | int ret, err = 0; | ^~~ semihosting/arm-compat-semi.c:370:14: note: shadowed declaration is here 370 | uint32_t ret; | ^~~ semihosting/arm-compat-semi.c:682:27: warning: declaration of ‘ret’ shadows a previous local [-Wshadow=local] 682 | abi_ulong ret; | ^~~ semihosting/arm-compat-semi.c:370:9: note: shadowed declaration is here 370 | int ret; | ^~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- semihosting/arm-compat-semi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 564fe17f75..0033a1e018 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -367,7 +367,6 @@ void do_common_semihosting(CPUState *cs) target_ulong ul_ret; char * s; int nr; - uint32_t ret; int64_t elapsed; nr = common_semi_arg(cs, 0) & 0xffffffffU; @@ -725,6 +724,9 @@ void do_common_semihosting(CPUState *cs) case TARGET_SYS_EXIT: case TARGET_SYS_EXIT_EXTENDED: + { + uint32_t ret; + if (common_semi_sys_exit_extended(cs, nr)) { /* * The A64 version of SYS_EXIT takes a parameter block, @@ -752,6 +754,7 @@ void do_common_semihosting(CPUState *cs) } gdb_exit(ret); exit(ret); + } case TARGET_SYS_ELAPSED: elapsed = get_clock() - clock_start;