From patchwork Fri Oct 6 11:36:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 729995 Delivered-To: patch@linaro.org Received: by 2002:a5d:4005:0:b0:31d:da82:a3b4 with SMTP id n5csp458325wrp; Fri, 6 Oct 2023 04:44:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEEP6J3+L9Twm5DkeXAL1yqZKBEVam02WNIaw/2TZZpXgGXXDkP/4RAekHLxPEPmoa5k/fv X-Received: by 2002:a81:8d52:0:b0:5a5:575:b222 with SMTP id w18-20020a818d52000000b005a50575b222mr6040231ywj.23.1696592652246; Fri, 06 Oct 2023 04:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696592652; cv=none; d=google.com; s=arc-20160816; b=fzOm3rVR50gPSYtEFYq19+6cDPjgqw7G1NOdmkUujoq1a1qZhS7Umg5uvv5in82/z4 T7V5KyzMBYronTZN2PgdXBZV4GCLmuEaRJwVV2jL+e/h2aSm7qLl+43nO6AfkvfcdKRY HnQVgBVlL0LMT/8+wEhyl6rXKO72IMxpLLpskYbg3IBS524As0rSGkwQbI4t9Gu00aUS 9iEw2/7ddXGFuOco4gFzkON7eVCspSD5jiMlSTgv43BPMWr0/bEpDrvCh3khuh5ZbFQl ewu+lw2rPFjC0ns+2t32jgmKmXYjhozqVXrtecHSInXXVxAzeQJY9DnrusWy4uUj2+M0 OmOA== 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=z+R5zaDK5SKD1cw+72zd9/gWLPUgkdgnoxFy8d3lUu8=; fh=kFeeQCZHOWMjM3PvFVR/cFiybISAQy4MaQRyjN/+tkQ=; b=Jf5k/wz0GuhHJ7CHyxtJBbdq/qxc7SsVo0pw7HmJfgfljay2gIBtcqyXo6LeLBZMVZ j3ZJND2Aj353bPjWjOZ+pxLCIyXVJxeAXVeUvZX+20uGYFZRTaRD/hQzABd+8I5+R+MD 0hiNCQQgaev5G67cidRnZmMLROwir6jdij/gEokdbS65dq+Eeki4rxkmXOJdC8Zg6EDh eq5Pd5bGBuGtVOlLVDjsgZDkmh+xib30kVUbjTivmG3RvTD1c14WfpREPWbY2xIu61k6 ghgkVNQsRRZZ5zpewKJalvtJxrdpu0nFqpT6I16/UufTpXWVbl9x8OZom01f38xa8D6X Rsgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AdJlP6YW; 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 b12-20020ac87fcc000000b003eb14b07a6dsi2295078qtk.125.2023.10.06.04.44.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Oct 2023 04:44:12 -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=AdJlP6YW; 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 1qoj9Q-0005BT-65; Fri, 06 Oct 2023 07:37: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 1qoj90-000531-3Y 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-0000Az-Vn 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=z+R5zaDK5SKD1cw+72zd9/gWLPUgkdgnoxFy8d3lUu8=; b=AdJlP6YW4PaRR0bwES2lQbIboDzVr/Z3chHBvUmLfdDERQgLMvt6SEJg6ON/GZYo6K/kd0 5mfa01unda9uWchhbxkd+n3RbIUwEMoi1h2vABjtdqiabkKQBND4HbtX694HlLBAh0k9sD REUZ8pvfQ4OtOuEpSORvTbC9ip1vixg= 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-418-EUOtDV6VPkeRLdOqQZeeaQ-1; Fri, 06 Oct 2023 07:37:01 -0400 X-MC-Unique: EUOtDV6VPkeRLdOqQZeeaQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 D795F800045; 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 A99C5170EE; Fri, 6 Oct 2023 11:37:00 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9D43B21E688A; 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?= , Richard Henderson Subject: [PULL 25/32] trace/control: Clean up global variable shadowing Date: Fri, 6 Oct 2023 13:36:50 +0200 Message-ID: <20231006113657.3803180-26-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.5 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: trace/control.c:288:34: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] void trace_opt_parse(const char *optarg) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/getopt.h:77:14: note: previous declaration is here extern char *optarg; /* getopt(3) external variables */ ^ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004120019.93101-17-philmd@linaro.org> Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Markus Armbruster --- trace/control.h | 4 ++-- trace/control.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/trace/control.h b/trace/control.h index dfd209edd8..6754bfe052 100644 --- a/trace/control.h +++ b/trace/control.h @@ -197,11 +197,11 @@ extern QemuOptsList qemu_trace_opts; /** * trace_opt_parse: - * @optarg: A string argument of --trace command line argument + * @optstr: A string argument of --trace command line argument * * Initialize tracing subsystem. */ -void trace_opt_parse(const char *optarg); +void trace_opt_parse(const char *optstr); /** * trace_get_vcpu_event_count: diff --git a/trace/control.c b/trace/control.c index 1a48a7e266..ef107829ac 100644 --- a/trace/control.c +++ b/trace/control.c @@ -285,10 +285,10 @@ bool trace_init_backends(void) return true; } -void trace_opt_parse(const char *optarg) +void trace_opt_parse(const char *optstr) { QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("trace"), - optarg, true); + optstr, true); if (!opts) { exit(1); }