From patchwork Wed Oct 4 12:00:08 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: 729290 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a4e:0:b0:31d:da82:a3b4 with SMTP id v14csp303483wrs; Wed, 4 Oct 2023 05:03:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG13QaLsAFPnDSK/o/4DVBgu6Wxnp52WPBCL9oeJdqKFADV4LtCO8SSfWGbOFMweRvNLgcn X-Received: by 2002:ac8:5f90:0:b0:418:3c05:b52b with SMTP id j16-20020ac85f90000000b004183c05b52bmr1900480qta.59.1696420998709; Wed, 04 Oct 2023 05:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696420998; cv=none; d=google.com; s=arc-20160816; b=Oxpr/92erCsrPJCFYQ19xeiEgiP9aWltLRlgIc4Khhvb29USLPRB8ZGQbe9Qb4zzcT U2UtQLyylsJ2rW0T18WTwZbTiyHO/jasILPmNF085fWcUKVaI21577fXYrjCn4PatKXy AXDNhZrlPvVmO754cI9u/xx/Xo4nXJo4pU7NuA983cFTwjfYtsa3AVuthN0XzGyyxNu3 hA2c1TGXVuT+91XHTDBrUVWP6JijSmG8JDGDjuWqiU9ugL6+ZKkqW80GsL09sJT1DuWO YSDCIdHOlpCE0ChxA4/GpCedpZRgWxCeOXxInBjZXSGPq9iDGrNf1XkPabl4hl46IbQj EhKQ== 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=uFvZwDADzu+jGNLm/Nr1aEk3hDp0zJEDlovZc+F59xM=; fh=CNsjeNie6BAg8/8M0tRWCL87LCJMuu7o8iXb2FRs2W0=; b=N6DxwYGoGP68uC1rU51GeRWyCo0+nx19hKHL1OWjLq02wJdoLnMbcKn4g9vOsHVvoB HyOg67/Y6AtSV08HB4WJ3RyrqosWPXUENAK1ycBkGhMtafZ69lud/Z5XzftdteiDj9bh /TVTKu8EdcAAJJUfBk3pjkbty4n8uiJ2y4m8xwE0ztWuk0IiDugu9Wq/Dk8WWGgQkQRN MJGRMib3FFNWZjVHisNDso1afRW5hntsLeRg1hDEhVvrvE3k5Kmso0BhzBXN4WEzekLK O8DrFP1pRHqKjHobCMCZNfmakvlwpFB4J1xjR4qfOmqvnqHptyhD7kJ+0Hr9I2VQYd5o o+BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CfIHqfe+; 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 e9-20020ac85dc9000000b004198efe4596si1382787qtx.70.2023.10.04.05.03.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Oct 2023 05:03:18 -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=CfIHqfe+; 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 1qo0ak-00017l-LQ; Wed, 04 Oct 2023 08:03:02 -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 1qo0Yj-00006h-HD for qemu-devel@nongnu.org; Wed, 04 Oct 2023 08:01:04 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qo0Yg-00010z-Ly for qemu-devel@nongnu.org; Wed, 04 Oct 2023 08:00:56 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4060b623e64so5255015e9.0 for ; Wed, 04 Oct 2023 05:00:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696420852; x=1697025652; 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=uFvZwDADzu+jGNLm/Nr1aEk3hDp0zJEDlovZc+F59xM=; b=CfIHqfe+XO5A2GWTasaHgTBZyPjmjz8EgE8LP0hzssONqBmBthiob8V7ji9e39nq87 7mWt7uT+jnyuxCoi4JAq6DNiZhMQMGWoJDG++EkBDPLNoFVmmhq1yw+qNokILVFsIFXe OrUDlNrk98YbHAfenEahhZJKaz/L0b/YIlD78zWQI3XF/cew7GxMYJP7hjl7mzOKQt0x de/v+4wf8j1D/lpT6LNz3Oyo0Jn+1bye1zoJecZvO6pgtlv4426akFd0vzlCBqQ8bUz9 882BEit66qtEYZZ/jrDIuOKYlIfFNvoyRKlJcv0IweKacFb+MJMhwLh2ws1mAopEY/GL Gk1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696420852; x=1697025652; 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=uFvZwDADzu+jGNLm/Nr1aEk3hDp0zJEDlovZc+F59xM=; b=l0U/s1O4ZbX1m4MAyEi9+vrTdMqCS1kS2aF4XkEhdbgoFbu8n//nbgl86N1S+tgdNK AaPfQTgTHxVBw788bEi1G36ySouolAq2Ouk8Jh+od+sFdYQpe/5/vWHlgU6z79eHsKKK fpgRtMxzJpdzhvSz6N+PyHFMUUoZR+sKkosbfqJbafnCT0ydwumK1fo7KUxtO2qZpH0P Gb/AYAciNPcKrQsPH/yjlDAb6NdB0ZQ9CfGtsAKEvcACYwEe2XlEThIJl/65ZwMsI+xI dRpOdQlR42v8DCknpkuLpBwMeTyNRy3V68D9Cbs4y1KmvQbLob0KUGDi9ea+JRgVWoMc Ny5g== X-Gm-Message-State: AOJu0YxK8IsvBhzkqCQYgOlJvuNC06rEL2ZHOakPEiQn0Fogsq4jvI7q 9w1PU1xYHrZNXTu4PMaEIqA2AVyd6b3xVQklMCA= X-Received: by 2002:a05:600c:3b11:b0:406:45c1:4dd with SMTP id m17-20020a05600c3b1100b0040645c104ddmr4664556wms.14.1696420852705; Wed, 04 Oct 2023 05:00:52 -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 g18-20020a5d5552000000b0032327b70ef6sm3865780wrw.70.2023.10.04.05.00.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Oct 2023 05:00:52 -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?= , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH v3 05/16] plugins/loader: Clean up global variable shadowing Date: Wed, 4 Oct 2023 14:00:08 +0200 Message-ID: <20231004120019.93101-6-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::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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=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 Fix: include/qemu/plugin.h:245:54: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static inline void qemu_plugin_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é Acked-by: Alex Bennée --- include/qemu/plugin.h | 4 ++-- plugins/loader.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index bc0781cab8..7fdc3a4849 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -50,7 +50,7 @@ static inline void qemu_plugin_add_opts(void) qemu_add_opts(&qemu_plugin_opts); } -void qemu_plugin_opt_parse(const char *optarg, QemuPluginList *head); +void qemu_plugin_opt_parse(const char *optstr, QemuPluginList *head); int qemu_plugin_load_list(QemuPluginList *head, Error **errp); union qemu_plugin_cb_sig { @@ -242,7 +242,7 @@ void qemu_plugin_user_postfork(bool is_child); static inline void qemu_plugin_add_opts(void) { } -static inline void qemu_plugin_opt_parse(const char *optarg, +static inline void qemu_plugin_opt_parse(const char *optstr, QemuPluginList *head) { error_report("plugin interface not enabled in this build"); diff --git a/plugins/loader.c b/plugins/loader.c index 809f3f9b13..734c11cae0 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -140,12 +140,12 @@ static int plugin_add(void *opaque, const char *name, const char *value, return 0; } -void qemu_plugin_opt_parse(const char *optarg, QemuPluginList *head) +void qemu_plugin_opt_parse(const char *optstr, QemuPluginList *head) { struct qemu_plugin_parse_arg arg; QemuOpts *opts; - opts = qemu_opts_parse_noisily(qemu_find_opts("plugin"), optarg, true); + opts = qemu_opts_parse_noisily(qemu_find_opts("plugin"), optstr, true); if (opts == NULL) { exit(1); }