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: 1843265 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=CfIHqfe+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S0tcm0Zjhz1ypx for ; Wed, 4 Oct 2023 23:03:20 +1100 (AEDT) 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-Google-Smtp-Source: AGHT+IEXIZTrg1qnQx3RubWF1mReyHjUCnbWwh/8W+VVNuAwgCBCuyd7CivVVgalmM/M6alD0O8fdA== 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.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); }