From: "flichtenheld (Code Review)" Date: Fri, 8 May 2026 11:27:29 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <7bc71d4689e24a0b405985dca995e8ff15daca69-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="ka51XU07Ouc="; 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: plaisthos Cc: openvpn-devel --ka51XU07Ouc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1672?usp=3Demail to review the following change. 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 --- M src/openvpnmsica/msiex.c M src/tapctl/tap.c 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/72/1672/1 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 6ed395d..cccc0e1 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: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ia688ec12e642de699811ced8668b40be9fbb6155 Gerrit-Change-Number: 1672 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --ka51XU07Ouc= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

V= iew Change

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

For some reason neither MSVC nor MinGW= complained?
cppcheck did (once told that msg is a printf-style
funct= ion).

Change-Id: Ia688ec12e642de699811ced8668b40be9fbb6155
Signed= -off-by: Frank Lichtenheld <frank@...2641...>
---
M src/openvpn= msica/msiex.c
M src/tapctl/tap.c
2 files changed, 3 insertions(+), 3 = deletions(-)

git pull ssh://gerrit.openvpn.net:2=
9418/openvpn refs/changes/72/1672/1
diff --git a/src/openvpnmsica/m=
siex.c b/src/openvpnmsica/msiex.c
index f8bf6ae..4d48f06 10= 0644
--- a/src/openvpnmsica/msiex.c
+++ b/s= rc/openvpnmsica/msiex.c
@@ -51,7 +51,7 @@
= *pszValue =3D (LPWSTR)malloc(++dwLength * sizeof(WCHAR)); if (*pszValue =3D=3D NULL)
{
- msg(M_FATAL, &q= uot;%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 6ed395d..cccc0e1 100644
--- a/s= rc/tapctl/tap.c
+++ b/src/tapctl/tap.c
@@ -= 487,8 +487,8 @@
}

default:

- = msg(M_NONFATAL, "%s: \"%ls\" registry value is not= string (type %u)", __FUNCTION__,
- dwValueType);
+ msg(M_NONFATAL, "%s: \"%ls= \" registry value is not string (type %u)",
+ __FUNCTION__, szName, dwV= alueType);
return ERROR_UNSUPPORTED_TYPE;
}
}

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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia688ec12e642de699811ced8668= b40be9fbb6155
Gerrit-Change-Number: 1672
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --ka51XU07Ouc=--