From patchwork Fri Jul 28 13:03:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3305 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:3787:b0:d7:3b0f:3938 with SMTP id jw7csp570727dyb; Fri, 28 Jul 2023 06:10:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlFWCf4DHCwRBnJ3hykw0GOjMq0OJzA+aQ9nr3sBZ4P7/yJp9mcKFRmuShXrVDB8+ixOfw19 X-Received: by 2002:a05:6a20:26a5:b0:133:6e6e:2b11 with SMTP id h37-20020a056a2026a500b001336e6e2b11mr1223383pze.2.1690549833447; Fri, 28 Jul 2023 06:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690549833; cv=none; d=google.com; s=arc-20160816; b=QMLYoJ2t4ldHVaAvLa61JvMbl2DZO/8Hr8pBr1nng9JK5AEAloNFZRZ/Yk0YKNfUGA hIwSE2Bf0fMWR69/+xX3mB4zcECPBNoGJzDmqsO6zUykWBXOm/BABzI4IMOOCa6mssJh 5OleGBu+GmXvuiTK3H0+kfFYwY/xV7UBsXNVZ+or0+c8D/i5hhmIDcj6/GtKBrQwfs3t GIkyW/iT9qmZB3wg5bes+36QKI18iLyk2W107iYmh9Lo+NUyNKbpRdvETrpHhsUuXZIF e6MpKfqkbE4SvsEnkFWLsgYhQnCaY+d89ZQai+bH8tabsDQMtpFr5KuvN6Sbpu1cWRfo XE+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:user-agent:mime-version :message-id:references:auto-submitted:cc:date:from:dkim-signature :dkim-signature:dkim-signature; bh=2aCKn4E4cUEnmnzsWgrCckL8WGc8uYIfW6KtLrfF/MU=; fh=ejqQk4evxSbcB4TOY987ChV164zUZaeCjiIZ6JGqg/c=; b=dwZ+MjP7bAXxuxf7KCxqFfvQMQznEr7Y4DG9rPsdi8mustKiCxsfX2gGRmnolw6uLg pFCi21yhE1d52SdcgyONk9Er3G1QqVuzFltNU45SZ15l0c/33HgREOQi8RaCSpeLCw8W LL2dPVxeyINe2cTAQ0cNsXZh4UY0wjd7Z+jFV/exX8Ukvug5Say6IkdXaHjORWCPi5kN iBlQPiUA9mcZJxO5H/wb02nAP3Grvrk6vXPPhZqZEK3zCNYnVeImB3lp9vsqbdfho6Xg N9KJEdir8nr9pdG9XeZphy6caXkyJM5tc8wCZ+Y2TsHUXnqpJx3riQOru1segIRWvwI0 MSvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=iWGx1uEV; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=kWFsG1lK; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b="Rh/jaXrW"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id bv127-20020a632e85000000b0055ffed90cf5si2948892pgb.209.2023.07.28.06.10.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jul 2023 06:10:33 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=iWGx1uEV; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=kWFsG1lK; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b="Rh/jaXrW"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qPNEQ-00027Q-Vz; Fri, 28 Jul 2023 13:10:11 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qPNEO-00027K-IG for openvpn-devel@lists.sourceforge.net; Fri, 28 Jul 2023 13:10:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:Date:From :Sender:To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rQbttIl54Yx5XAXHT3CVRk0/uG9l6SWJ12Ox5ij+y+c=; b=iWGx1uEV/+gAH4ZpmQNmDr6L9U SFAE+Hbps7GeLTNSgBeg7MqWtulddD5lnNJvidxDo7rqlAOF9JXQVDWmNgWJsm6r+JkaWxBrprBQd 6bgNDZNi7mlw23quluvknWM3Wxk113FFU81VOA8rgMklYsqQuIjwLsMUP8KtqB4eudVA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:Date:From:Sender:To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=rQbttIl54Yx5XAXHT3CVRk0/uG9l6SWJ12Ox5ij+y+c=; b=k WFsG1lKkg4ukHTl4o1kAGnR2CPPCyB4R2hCGqiTpwGAjMn7vhdqk/jgopuxlvaszTX97G5LAfm0MM vvPxQOhTDiXASTI1iUO7gkkEcUKBj/YIWoHJvkUCOrMZ/enDDmGDPAwslPFbmRtaD5PmSn4KTNI2Y XhcTQK5tkZYEFgDU=; Received: from mail-wr1-f50.google.com ([209.85.221.50]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1qPNEM-005Wq8-6i for openvpn-devel@lists.sourceforge.net; Fri, 28 Jul 2023 13:10:08 +0000 Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-31768ce2e81so2189095f8f.1 for ; Fri, 28 Jul 2023 06:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1690549799; x=1691154599; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:date:from:from:to:cc :subject:date:message-id:reply-to; bh=rQbttIl54Yx5XAXHT3CVRk0/uG9l6SWJ12Ox5ij+y+c=; b=Rh/jaXrWMWlBLBSPo5qG8yGjpeYy3ygqYSuF4iBG5aSWLOT7uFGmHW05gqED7urrfJ 3DccMVFK9X6iqtKALGQLJKWLbOdMRHhHbuSvYZPx0SNTyhxTRHffxfYazj6RbBYc/B8v AsxPUzg5satKGHtL+f5Zl6sxAEsvmgezkdLdyUB0S+yuQjYujeGE3/8BEgpQN0gbfcpN 6eyWdxqe7Dn9mAwl2kq7/++slbNQad87sgd8E/HYQx876uofL1CT4gqT/rtp+kQYzD+0 +0a1z1VnjwBtM6MReRAozBxrxsZrQ9VkPtNHMGUrrQwR7GLyV7v1gXL+YbskSf2aGTNr 4DcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690549799; x=1691154599; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rQbttIl54Yx5XAXHT3CVRk0/uG9l6SWJ12Ox5ij+y+c=; b=gusLaVf98hLJvCIRpdTeLVo8vlCTf7Ciblc9RDPBPjPZeAMw9WY9iWoyeKmq9ArrXG t/G/VJhiOfGsJmZNAU0hCMTYXpOg+04LIyo8kq/VjmtuHA2/DpbMra0HdcBnqCHsmjCF knN0ZvPPdpKRk7AW4oVbVOoF5Yqrhkiku1M9MoU+9jdmjQIoL1Co5OsZH7jgmfw2q2Es a8KuoyD+QWLKjvqO3kahpqyid2GnCSGJlMqv4zi00sxgaUVG2s4x2fXY8/tSTbBAn+9C K810i7waTfjztKRQBENnGlRj+jQwHe6aeAHiV3LVGJm/FxTZiqx1ti/PeLwQwXVhzTxe 6lXg== X-Gm-Message-State: ABy/qLY1myvOsua6TrQ3OJDbP2O0YqF1D8g46ouaL99s4cbPmBJCXzQA eBxKKMOye+yTPLB22PCmKf41WGJazBSs6yJDQdw= X-Received: by 2002:a05:600c:2182:b0:3fe:90f:8496 with SMTP id e2-20020a05600c218200b003fe090f8496mr1481247wme.1.1690549412198; Fri, 28 Jul 2023 06:03:32 -0700 (PDT) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id k17-20020a7bc311000000b003fc02218d6csm6942664wmj.25.2023.07.28.06.03.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 06:03:31 -0700 (PDT) From: "flichtenheld (Code Review)" X-Google-Original-From: "flichtenheld (Code Review)" X-Gerrit-PatchSet: 1 Date: Fri, 28 Jul 2023 13:03:31 +0000 Cc: openvpn-devel Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I9f9d0f0d5ab03f8cdfd7ba7200f2d56613cc586d X-Gerrit-Change-Number: 320 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 0f3ed145e38a7a3a45cc34f9e590f8f9976e6a6f References: Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.8.0 X-Spam-Score: 1.0 (+) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: flichtenheld has uploaded this change for review. ( http://gerrit.openvpn.net/c/openvpn/+/320?usp=email ) Change subject: options: Do not hide variables from parent scope Content analysis details: (1.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 1.2 MISSING_HEADERS Missing To: header 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.50 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.50 listed in list.dnswl.org] 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1qPNEM-005Wq8-6i Subject: [Openvpn-devel] [XS] Change in openvpn[master]: options: Do not hide variables from parent scope X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: frank@lichtenheld.com, openvpn-devel@lists.sourceforge.net Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1772669982005465295?= X-GMAIL-MSGID: =?utf-8?q?1772669982005465295?= flichtenheld has uploaded this change for review. ( http://gerrit.openvpn.net/c/openvpn/+/320?usp=email ) Change subject: options: Do not hide variables from parent scope ...................................................................... options: Do not hide variables from parent scope msglevel hides the function parameter of the same name, which could lead to confusion. Use a unique name. Change-Id: I9f9d0f0d5ab03f8cdfd7ba7200f2d56613cc586d Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- M src/openvpn/options.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/20/320/1 diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 90d85be..d168163 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -9476,24 +9476,24 @@ else { int i; - int msglevel = msglevel_fc; + int msglevel_unknown = msglevel_fc; /* Check if an option is in --ignore-unknown-option and * set warning level to non fatal */ for (i = 0; options->ignore_unknown_option && options->ignore_unknown_option[i]; i++) { if (streq(p[0], options->ignore_unknown_option[i])) { - msglevel = M_WARN; + msglevel_unknown = M_WARN; break; } } if (file) { - msg(msglevel, "Unrecognized option or missing or extra parameter(s) in %s:%d: %s (%s)", file, line, p[0], PACKAGE_VERSION); + msg(msglevel_unknown, "Unrecognized option or missing or extra parameter(s) in %s:%d: %s (%s)", file, line, p[0], PACKAGE_VERSION); } else { - msg(msglevel, "Unrecognized option or missing or extra parameter(s): --%s (%s)", p[0], PACKAGE_VERSION); + msg(msglevel_unknown, "Unrecognized option or missing or extra parameter(s): --%s (%s)", p[0], PACKAGE_VERSION); } } err: