From: "cron2 (Code Review)" Date: Fri, 11 Aug 2023 14:52:50 +0000 In-Reply-To: References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <882978641c96477f108b1c7397b5a36901ea9f5d-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="lGkNr0+rNXs="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: options: Do not hide variables from parent scope List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --lGkNr0+rNXs= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/320?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by plaisthos 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 Message-Id: URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26= 902.html Signed-off-by: Gert Doering --- M src/openvpn/options.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/20/320/2 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 =3D msglevel_fc; + int msglevel_unknown =3D msglevel_fc; /* Check if an option is in --ignore-unknown-option and * set warning level to non fatal */ for (i =3D 0; options->ignore_unknown_option && options->ignore_un= known_option[i]; i++) { if (streq(p[0], options->ignore_unknown_option[i])) { - msglevel =3D M_WARN; + msglevel_unknown =3D M_WARN; break; } } if (file) { - msg(msglevel, "Unrecognized option or missing or extra paramet= er(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 paramet= er(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: -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/320?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I9f9d0f0d5ab03f8cdfd7ba7200f2d56613cc586d Gerrit-Change-Number: 320 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --lGkNr0+rNXs= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #2 to the change originally cr= eated by flichtenheld.

View Change

The following approvals got outda= ted and were removed: Code-Review+2 by plaisthos

options: Do not hide variables from parent scope=


msglevel hides the function parameter of the same name,
which co= uld lead to confusion. Use a unique name.

Change-Id: I9f9d0f0d5ab03f= 8cdfd7ba7200f2d56613cc586d
Signed-off-by: Frank Lichtenheld <frank@...1186...= .2641...>
Acked-by: Lev Stipakov <lstipakov@...277...>
Messa= ge-Id: <d549c9b5e5d66624ef82f99206898ff8e43a5fb5-HTML@...2715...>
= URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26= 902.html
Signed-off-by: Gert Doering <gert@...1296...>
---
M= src/openvpn/options.c
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/20/32=
0/2
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 =3D msglevel_fc;
+ int msglevel_unknown =3D msglevel_fc;<= br> /* Check if an option is in --ignore-unknown-option and
* set warning level to non fatal */
for (i =3D 0; options->ignore_unknown_option && optio= ns->ignore_unknown_option[i]; i++)

{
= if (streq(p[0], options->ignore_unknown_option[i]))
{
- msglevel =3D M_WARN;
+ msglevel_unknown =3D M_WARN;
break;
} }
if (file)
= {
- msg(m= sglevel, "Unrecognized option or missing or extra parameter(s) in %s:%= d: %s (%s)", file, line, p[0], PACKAGE_VERSION);
+ msg(msglevel_unknown, "U= nrecognized option or missing or extra parameter(s) in %s:%d: %s (%s)"= , file, line, p[0], PACKAGE_VERSION);
}
= else
{
- msg(msglevel, "Unrecognized optio= n or missing or extra parameter(s): --%s (%s)", p[0], PACKAGE_VERSION)= ;
+ msg(ms= glevel_unknown, "Unrecognized option or missing or extra parameter(s):= --%s (%s)", p[0], PACKAGE_VERSION);
}=
}
err:

= To view, visit change 320. To unsubscribe, or for help writing mail filters, vis= it settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9f9d0f0d5ab03f8cdfd7ba7200f= 2d56613cc586d
Gerrit-Change-Number: 320
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--lGkNr0+rNXs=--