From patchwork Wed Oct 4 12:00:14 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: 729297 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a4e:0:b0:31d:da82:a3b4 with SMTP id v14csp304788wrs; Wed, 4 Oct 2023 05:04:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQPyPCG/pc6l97tp2vFLCBKL0gNIQAAZgnB7Pmjbmiw2eHIoWURdbYJ26jke3jFOHObaXr X-Received: by 2002:a1f:4887:0:b0:493:3491:ce89 with SMTP id v129-20020a1f4887000000b004933491ce89mr1427679vka.14.1696421085185; Wed, 04 Oct 2023 05:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696421085; cv=none; d=google.com; s=arc-20160816; b=T8XbX5C2Y7rlkc4mwbnLOkA/1hBNrYyXXzM+X0sOgFDRs/BxoXiivg6iVW43N8gGyo w3beGF7KfkfUhjW8fbkqHb3E/wa1tGL/tXDe8vnbvmFJhcgva8fdsXHXyICSDO7l9SFs b8fUh6y8oFPOBsMMErra1o4afYWxKUgt333BKO4yXo1bs/gxPmJI20OOG5w9ofaI1U9d kwEIFLRWcffhDuVzrsZIfPLOQFSu9QcQFcKQmme2dr8tqySADG1yStgTbwGo4hP+dmx/ GOJDb3l2Tv1m7p52xBNYXpBg5Y+Ng6hSJa+o9DJterCpefcWlyrjyW7Z9NUTgdnS9b/n ejeA== 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=9QTZPnGa7dzlAxYI3K0r+uL7KCteU3g2TmxdKpGNVN0=; fh=wOOH2wy3sHyPLjvJJJsdtILmIpS3E3TykE4s3MhiAsQ=; b=j5R7ksf+KqBGJS9j2aink4J/G+Mwvs1RKhQ+ygQKtz4c330jbh0uA9L2iZvsqzBJB9 KS6Yui+Pvw3RGlmizVxy6UQND0bbTEX8N6TcpSWxW6ky72J83QFgTMJkE2ky9VuHcrFx vEBmOwztdcVbB7AcZVqiSpMVL4IEqJk0x+WbwzoGH7a8PgKbyZFNVkaAYYIFeydqnF7n v4ilSfen7Sfud4Xt/DsBNlqOmI3rawtywIUyydKT6pSP2tA2EqIm5fBu74KjLwZ7lZjP baZcptpcQcukrkNNWeLRCdAiGj3kWVwsbomq2f/owAGTe5iyKgDOCfmB+5WkQBzeShP9 9Nsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AFm0zfRD; 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 i8-20020ac5cd88000000b0049d12298590si248201vka.252.2023.10.04.05.04.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Oct 2023 05:04: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=AFm0zfRD; 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 1qo0b6-00036E-SA; Wed, 04 Oct 2023 08:03:24 -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 1qo0ZK-0000Pb-6G for qemu-devel@nongnu.org; Wed, 04 Oct 2023 08:01:37 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qo0ZI-00017M-21 for qemu-devel@nongnu.org; Wed, 04 Oct 2023 08:01:33 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-406650da82bso19153275e9.3 for ; Wed, 04 Oct 2023 05:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696420890; x=1697025690; 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=9QTZPnGa7dzlAxYI3K0r+uL7KCteU3g2TmxdKpGNVN0=; b=AFm0zfRDJoWdXeEUqHwgxSFITCWXs1/nS40U2pGSA1YbQoX5FKNnYF/gJH4J+463hC W1nFq05MjC1BebyLaMGtEVb+JSvpspdr+ZRy/D0dtZWgSBNHJfoNrEdGjeHV70/Rozi0 rFeHWPbUZe91ubilp6d9Dy05yL6I3UToJc/EUJZtbiVA0U3KNIba6nWK3Y0hGIUoSO5d TEiSqodx2koWjfLNuIpMA1fdZsKmKmacMPY2nPegfYJ9YU/rg+FdJmi919LKZk/tJKj+ o6p2kuht2u/W0+UsHdeZbhoxDMePN5Jc/m4RmPCqSFUaNdIS9/dce8+CXbRWeTn8DOSw pA6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696420890; x=1697025690; 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=9QTZPnGa7dzlAxYI3K0r+uL7KCteU3g2TmxdKpGNVN0=; b=qRsCYd8I1Qjy8lM7NVEIeoWG85fsdh70OrqKUIZBeWrcALKiywuaptJTb55aZE2XoF Q/gaPXw7WaMMIWeqmjj34PaWbM4NVHFBJ8LYJ42OWKL5Q0yUnYhwB/DxA1bBmsKYmNqf 0ncnqTXTdZdFOuDvRH33EPkBlMz2VRKvxRlR9PonsmSY/Ly3DTDKCKv+jl/g/sSIta28 Q4VszlbRm6F5HezoVV+5FTqCYO/DOgzw1cXkRYixS7I8hSCsmcXqrWYjv2RKvnhwSpmM MdeW8WvDQHwtCbrV0BQ/uhrPkVlGctrer+2PIqOSbMM0vUKGOmHbZUJAUWHto4uYUgKN Y2dg== X-Gm-Message-State: AOJu0YxKJ2ikRFRjOcAu2D78yaMwbiGQF8tFNBoncMOgv82FALFdEySY MnjAtdCJqRyfm9D2mMId4EjYUNz0CRCFZPrUGDg= X-Received: by 2002:a1c:7209:0:b0:405:a30:151e with SMTP id n9-20020a1c7209000000b004050a30151emr2290577wmc.12.1696420889413; Wed, 04 Oct 2023 05:01:29 -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 e16-20020a056000121000b00324853fc8adsm3838124wrx.104.2023.10.04.05.01.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Oct 2023 05:01:29 -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?= Subject: [PATCH v3 11/16] util/cutils: Clean up global variable shadowing in get_relocated_path() Date: Wed, 4 Oct 2023 14:00:14 +0200 Message-ID: <20231004120019.93101-12-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::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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: util/cutils.c:1147:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const char *exec_dir = qemu_get_exec_dir(); ^ util/cutils.c:1035:20: note: previous declaration is here static const char *exec_dir; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake --- util/cutils.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util/cutils.c b/util/cutils.c index 25373198ad..b44718a6a2 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -1144,7 +1144,6 @@ char *get_relocated_path(const char *dir) { size_t prefix_len = strlen(CONFIG_PREFIX); const char *bindir = CONFIG_BINDIR; - const char *exec_dir = qemu_get_exec_dir(); GString *result; int len_dir, len_bindir;