From patchwork Fri Oct 6 11:36:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 729986 Delivered-To: patch@linaro.org Received: by 2002:a5d:4005:0:b0:31d:da82:a3b4 with SMTP id n5csp456631wrp; Fri, 6 Oct 2023 04:39:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwxT+r7zq1NF4LkIXsG3PmssSoe9TLdltux18QOm20/IwPGluBfCGbOHT6X1PZNOsCWX+Q X-Received: by 2002:a0c:f14b:0:b0:655:d6ff:891f with SMTP id y11-20020a0cf14b000000b00655d6ff891fmr7718733qvl.60.1696592396414; Fri, 06 Oct 2023 04:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696592396; cv=none; d=google.com; s=arc-20160816; b=wOHswGBx6m0XfSwkJ04dOHX7tf4a5y+vEZgWza4QzEoSq2OIFpWzTAwBQNoQ+VWQXa nYKvZSZb6n+PjYX+TqHyExdRiSfLdRleF2fJunYZE4YH+496M8xyv9Gtjf72Tr2lpz29 lI69u+ZXqXC2vU7MlD4Wqaa4RG3fBp15jVEnrL4fP7iXezrNdmDccOU6q/OIOvtrydwN gxxt6vYQpX0yDuczm35y0Kum0HMcbfOkqz8KcNatfqs6h0qcQuUq9J2mMcyh5bP9isY+ 0g1U6jaMKwyQAVN7jHCkT5feFF/BbPr19UfrW9IqabwPGKlBmXGsmlac1dc/49vZwbSe IQNQ== 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=PmF1lPTY/N4yZXnoI95jbT0XyzCg+nV6j51RKZahf70=; fh=i1pZRuKD5MhOXg6DnHnBvYF8Xhy7p4U+yXFYiz2hjRc=; b=SZhgS1kTaGzTsQNINB0qFsMfTawornJRNnbK1tWAeb6tmHMZvhCPT2jQTnbrChC2k/ TDL/Z5c2wa8XJASe1jlAOb3yCqgVHdgT2aqX5gSjqtRBG8TViLkZBEcbM2eE8FH6LJtF oa61L+vqwzmRyMAdupDUw1EvomyMX4MZRkkzAupNsOvD/L0IOyOga8a6t2EilmZi6kOI m6J14I145NrHSxDhKEVimDARwfNNJVCylG13HX6Dq4P5L1gqnkCdC4eQ6Z+Zpgimj/o0 49IO7afFH6DaHvhQ6clGjcsXqT+urohokjku2es5IKbOo3I32fms0wPDz2hkMJn1VXRV 2onQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VuQBsMfb; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k13-20020a0cf58d000000b006472db95085si2154787qvm.544.2023.10.06.04.39.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Oct 2023 04:39:56 -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=@redhat.com header.s=mimecast20190719 header.b=VuQBsMfb; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoj9I-00057o-J7; Fri, 06 Oct 2023 07:37:40 -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 1qoj8z-00052v-AG for qemu-devel@nongnu.org; Fri, 06 Oct 2023 07:37:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoj8t-0000Ar-8d for qemu-devel@nongnu.org; Fri, 06 Oct 2023 07:37:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696592234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PmF1lPTY/N4yZXnoI95jbT0XyzCg+nV6j51RKZahf70=; b=VuQBsMfbNTj2RPTNVW0d3rgbEb3z3eoyvrKZo86fEelaki7cwT2ieOxHhDIWVy4y/m4Cwa r/zSHdjz1GPLJIeKL/siHJszDYkecoptx2QgpPpmiiXht7tVtulQAuM6zDsnmvhq/DDQJj lCU2EROBQGn7cSe1TxILrgVfpp+UahQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-610-FRB752AhO7i51ut9_CXhsQ-1; Fri, 06 Oct 2023 07:37:01 -0400 X-MC-Unique: FRB752AhO7i51ut9_CXhsQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B8385811E8E; Fri, 6 Oct 2023 11:37:00 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96C8640C6EC0; Fri, 6 Oct 2023 11:37:00 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8EF3421E6884; Fri, 6 Oct 2023 13:36:57 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Blake , Richard Henderson Subject: [PULL 20/32] util/cutils: Clean up global variable shadowing in get_relocated_path() Date: Fri, 6 Oct 2023 13:36:45 +0200 Message-ID: <20231006113657.3803180-21-armbru@redhat.com> In-Reply-To: <20231006113657.3803180-1-armbru@redhat.com> References: <20231006113657.3803180-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 From: Philippe Mathieu-Daudé 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é Message-ID: <20231004120019.93101-12-philmd@linaro.org> Reviewed-by: Eric Blake Reviewed-by: Richard Henderson Signed-off-by: Markus Armbruster --- 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;