From: "cron2 (Code Review)" Date: Mon, 11 May 2026 12:11:04 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <6638a255339c410a3e62d5babb8c84f6ab1aa573-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="vbshCvrIqOc="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Fix some msg() calls with wrong number of arguments in Windows-only code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: plaisthos , openvpn-devel --vbshCvrIqOc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/16= 72?usp=3Demail ) Change subject: Fix some msg() calls with wrong number of arguments in Wind= ows-only code ...................................................................... Fix some msg() calls with wrong number of arguments in Windows-only code For some reason neither MSVC nor MinGW complained? cppcheck did (once told that msg is a printf-style function). Change-Id: Ia688ec12e642de699811ced8668b40be9fbb6155 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1672 Message-Id: <20260508153108.13488-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36= 862.html Signed-off-by: Gert Doering --- M src/openvpnmsica/msiex.c M src/tapctl/tap.c 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openvpnmsica/msiex.c b/src/openvpnmsica/msiex.c index f8bf6ae..4d48f06 100644 --- a/src/openvpnmsica/msiex.c +++ b/src/openvpnmsica/msiex.c @@ -51,7 +51,7 @@ *pszValue =3D (LPWSTR)malloc(++dwLength * sizeof(WCHAR)); if (*pszValue =3D=3D NULL) { - msg(M_FATAL, "%s: malloc(%u) failed", dwLength * sizeof(WCHAR)= ); + msg(M_FATAL, "%s: malloc(%u) failed", __FUNCTION__, dwLength *= sizeof(WCHAR)); return ERROR_OUTOFMEMORY; } diff --git a/src/tapctl/tap.c b/src/tapctl/tap.c index 16e3c0b..1d94988 100644 --- a/src/tapctl/tap.c +++ b/src/tapctl/tap.c @@ -487,8 +487,8 @@ } default: - msg(M_NONFATAL, "%s: \"%ls\" registry value is not string (typ= e %u)", __FUNCTION__, - dwValueType); + msg(M_NONFATAL, "%s: \"%ls\" registry value is not string (typ= e %u)", + __FUNCTION__, szName, dwValueType); return ERROR_UNSUPPORTED_TYPE; } } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1672?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ia688ec12e642de699811ced8668b40be9fbb6155 Gerrit-Change-Number: 1672 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --vbshCvrIqOc= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

Fix some msg() calls with wrong number of argume=
nts in Windows-only code

For some reason neither MSVC nor MinGW comp= lained?
cppcheck did (once told that msg is a printf-style
function).=

Change-Id: Ia688ec12e642de699811ced8668b40be9fbb6155
Signed-off-= by: Frank Lichtenheld <frank@...2641...>
Acked-by: Gert Doering &l= t;gert@...1296...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+= /1672
Message-Id: <20260508153108.13488-1-gert@...1296...>
URL:= https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36862.= html
Signed-off-by: Gert Doering <gert@...1296...>
---
M src= /openvpnmsica/msiex.c
M src/tapctl/tap.c
2 files changed, 3 insertion= s(+), 3 deletions(-)

diff --git a/src/openvpnmsica/msiex.c b/src/openvpnmsica/msiex.c<=
br>index f8bf6ae..4d48f06 100644
--- a/src/openvpnmsi= ca/msiex.c
+++ b/src/openvpnmsica/msiex.c
@= @ -51,7 +51,7 @@
*pszValue =3D (LPWSTR)malloc(++dw= Length * sizeof(WCHAR));
if (*pszValue =3D=3D NULL= )
{
- msg(M_FATAL, "%s: malloc(%u) failed", dwLength= * sizeof(WCHAR));
+ = msg(M_FATAL, "%s: malloc(%u) failed", __FUNCTION__, dw= Length * sizeof(WCHAR));
return ERROR_OUTOFMEM= ORY;
}

diff --gi= t a/src/tapctl/tap.c b/src/tapctl/tap.c
index 16e3c0b..1d94= 988 100644
--- a/src/tapctl/tap.c
+++ b/src= /tapctl/tap.c
@@ -487,8 +487,8 @@
= }

default:
- msg(M_NONFATAL, "%s: \&quo= t;%ls\" registry value is not string (type %u)", __FUNCTION__,
- dwValueT= ype);
+ ms= g(M_NONFATAL, "%s: \"%ls\" registry value is not string (typ= e %u)",
+ = __FUNCTION__, szName, dwValueType);
r= eturn ERROR_UNSUPPORTED_TYPE;
}
}


To view, visit change 1672. To unsubscribe, or= for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia688ec12e642de699811ced8668= b40be9fbb6155
Gerrit-Change-Number: 1672
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --vbshCvrIqOc=--