From patchwork Mon Sep 4 16:12:24 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: 719997 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1688009wrh; Mon, 4 Sep 2023 09:17:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSLhzPWQI8dyGBJh2GCD1miLz+6IQsQ1+FU/kSWwT+d67TwSBRvXtULMljjqjNl1ufB1wF X-Received: by 2002:a0c:f189:0:b0:64f:4ba6:3b2d with SMTP id m9-20020a0cf189000000b0064f4ba63b2dmr11229280qvl.44.1693844264140; Mon, 04 Sep 2023 09:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844264; cv=none; d=google.com; s=arc-20160816; b=U5XdWvM5Z/AU2GalgsmbIjg4v04tZbjVu3z/Zi3W9/Si4TauonxW+LpnsxaIezjZS0 t/7UTqK04oaEzbW2Rd9DYgODbX4qGY7bXTZbBxG2bP/R1USO3saNmnuaFCQhDx/OOBTT VVMn7kve8cKkb6rYbmguxU1BDQpoCC57gn1nHXSW9z4nCdj2PATFH2NnNtJYvKLUHWpE 99kob8YNtTSoEIrNBZNPtMrvR+TtmSzVfRKzOjG15y9+DEdTVgLu8CRrJxLoN3KLRtsV MZNq21W4eFROUKBXFQwL2KPXWCz+UgMyTIviNkQILHy4uYdHZnZaVlNwO/jQ8v30YWsd AItw== 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=07RpMt5MApgRw9NJGh9PZXX3Pgabrwsg/tvmA1poNBo=; fh=M4+wifAeNQ6fagA7lq67eYgVVAfcj+heqTkZZhMPaG0=; b=rs1qlghPv5T0TMPsGIS5SVvy0DTScTKw35dPDNn5w36vrWvNLX7F6ls0aPkf5GNCmE ZMu+uy0EpmhSUXyPz0BL3ZBffE1u/E0NCVwNdkm5vnoMkrlU0t7IucWDBikgthd7NKzG T4qGc4XVecPup1N8yoi7LJ3BmB0bAO+AOlL1wQvnRYUtQ/5hdu4XaemlmCyw/pzxomEV 0Z/uUTTCHeAmDMfrSHXgg+9KghKVfX1InoRv8WW5yjFNZOOcOiEM8eHNgoZe42ZQZ+Nb HvKxlyY9RidnyUkWevhVtcduPtPN6Uw7fb8R3hhPCq2F73YUkUbtnkneRO8HKQxWPm97 aH9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="c/973/uT"; 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 j17-20020a0cf511000000b0064cd41b2cf3si6682573qvm.25.2023.09.04.09.17.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:17:44 -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="c/973/uT"; 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 1qdCDH-0003oF-78; Mon, 04 Sep 2023 12:14:07 -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 1qdCD3-0003O6-My for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:57 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCz-0007dJ-Fx for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:53 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-52713d2c606so2185766a12.2 for ; Mon, 04 Sep 2023 09:13:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844026; x=1694448826; 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=07RpMt5MApgRw9NJGh9PZXX3Pgabrwsg/tvmA1poNBo=; b=c/973/uTe+N/IQykusnsMFRVUVB2N7JThDoD1ZZmid2KoFWyS206xgELMhWyjUvzhn Nj+656nMRl2zkTuSE9/MBHrlQn6kGelrB4clh1Sj8r1ZeaCCKqTEGt4JxeiZxAImz8zR w9tJNqlj7zvwEVPzW6SK/HR05/TJImooitZZiyeilD+0YMsqZJsMoljA8fGZW23exoVk /RWH+8ZNPQQmL9JAIBSWFWRvRWXt9czo6jVNryq6C+ddIYjXsY0c28t1Qe5eegAUn9B3 Th+J3uBcEZgGsbGGb1AjKTNMWhOlBuf6NbSUWxm9ooPaIBdtKE8+Erv/uNyKewQ+kuV4 +sSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844026; x=1694448826; 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=07RpMt5MApgRw9NJGh9PZXX3Pgabrwsg/tvmA1poNBo=; b=fCu8ZyvPTzZCvWrVnv4ikKhtolt3NHrzjYWMQYPsNz0iqnn5oF1QS1wTHbI/8Ur9/2 GZ5nsqRldgojtjCt8KD3Zoo2Klvn6mtcNWQ6Y8YAGk7sSjr746N52RxM/3FuU4KbD6D5 sFiYLR5SY5Km2YesOtT3mN1ykURd+FJx7BaS+Q5pqSyt+zhAF7hd3Rmas7AT/cHIcJOA +a9EGRSS7CLKUdRmeM2MqS8UmIEbR9qLaxtS9CF5VHrcYIP9VzqTfC47bgal8RqgfKae mmUYenyoad2Yggu8wPPi2Voe12PRIgS8+Y0ZmBjeN7MfuwjC/sSITkYeb9Ay7oPMKqLF MZ5Q== X-Gm-Message-State: AOJu0Yxd9LyRY5Py2ycO4R+DbZG9fUgWtUghrmc7ZZBoIcgtZfwIyM7P DfLIrpkA+l7p9jo+s7QhWwHDRA== X-Received: by 2002:aa7:d6cb:0:b0:523:d8bf:3298 with SMTP id x11-20020aa7d6cb000000b00523d8bf3298mr6739551edr.17.1693844026378; Mon, 04 Sep 2023 09:13:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id b22-20020aa7d496000000b0051dd19d6d6esm6048130edr.73.2023.09.04.09.13.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Laurent Vivier Subject: [PATCH v2 12/22] hw/m68k: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:24 +0200 Message-ID: <20230904161235.84651-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.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: hw/m68k/virt.c:263:13: error: declaration shadows a local variable [-Werror,-Wshadow] BOOTINFOSTR(param_ptr, BI_COMMAND_LINE, ^ hw/m68k/bootinfo.h:47:13: note: expanded from macro 'BOOTINFOSTR' int i; \ ^ hw/m68k/virt.c:130:9: note: previous declaration is here int i; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/m68k/bootinfo.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/m68k/bootinfo.h b/hw/m68k/bootinfo.h index a3d37e3c80..0e6e3eea87 100644 --- a/hw/m68k/bootinfo.h +++ b/hw/m68k/bootinfo.h @@ -44,15 +44,14 @@ #define BOOTINFOSTR(base, id, string) \ do { \ - int i; \ stw_p(base, id); \ base += 2; \ stw_p(base, \ (sizeof(struct bi_record) + strlen(string) + \ 1 /* null termination */ + 3 /* padding */) & ~3); \ base += 2; \ - for (i = 0; string[i]; i++) { \ - stb_p(base++, string[i]); \ + for (unsigned i_ = 0; string[i_]; i_++) { \ + stb_p(base++, string[i_]); \ } \ stb_p(base++, 0); \ base = QEMU_ALIGN_PTR_UP(base, 4); \ @@ -60,7 +59,6 @@ #define BOOTINFODATA(base, id, data, len) \ do { \ - int i; \ stw_p(base, id); \ base += 2; \ stw_p(base, \ @@ -69,8 +67,8 @@ base += 2; \ stw_p(base, len); \ base += 2; \ - for (i = 0; i < len; ++i) { \ - stb_p(base++, data[i]); \ + for (unsigned i_ = 0; i_ < len; ++i_) { \ + stb_p(base++, data[i_]); \ } \ base = QEMU_ALIGN_PTR_UP(base, 4); \ } while (0)