From: "flichtenheld (Code Review)" Date: Wed, 8 Oct 2025 16:53:51 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="GsVEQJV242o="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: lzo: Fix conversion warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --GsVEQJV242o= 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/+/1260?usp=3Demail to review the following change. Change subject: lzo: Fix conversion warning ...................................................................... lzo: Fix conversion warning We already have an assert ensuring the value is sane, so just add the cast. Change-Id: I4a5c46f321709c83a4a921366630fb8e02834701 Signed-off-by: Frank Lichtenheld --- M src/openvpn/lzo.c 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/60/1260/1 diff --git a/src/openvpn/lzo.c b/src/openvpn/lzo.c index 8daaec0..8307b59 100644 --- a/src/openvpn/lzo.c +++ b/src/openvpn/lzo.c @@ -72,11 +72,6 @@ *header =3D NO_COMPRESS_BYTE; } =20 -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - static void lzo_decompress(struct buffer *buf, struct buffer work, struct compress_con= text *compctx, const struct frame *frame) @@ -107,7 +102,7 @@ } ASSERT(buf_safe(&work, zlen)); - work.len =3D zlen; + work.len =3D (int)zlen; dmsg(D_COMP, "LZO decompress %d -> %d", buf->len, work.len); compctx->pre_decompress +=3D buf->len; @@ -126,10 +121,6 @@ } } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - const struct compress_alg lzo_alg =3D { "lzo", lzo_compress_init, lzo_comp= ress_uninit, lzo_compress, lzo_decompress }; #endif /* ENABLE_LZO */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1260?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: I4a5c46f321709c83a4a921366630fb8e02834701 Gerrit-Change-Number: 1260 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --GsVEQJV242o= 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

lzo: Fix conversion warning

We alrea= dy have an assert ensuring the value is sane,
so just add the cast.
<= br>Change-Id: I4a5c46f321709c83a4a921366630fb8e02834701
Signed-off-by: F= rank Lichtenheld <frank@...2641...>
---
M src/openvpn/lzo.c
= 1 file changed, 1 insertion(+), 10 deletions(-)

=
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/60/1260/1
diff --git a/src/openvpn/lzo.c b/src/openvpn/lzo.c
inde= x 8daaec0..8307b59 100644
--- a/src/openvpn/lzo.c+++ b/src/openvpn/lzo.c
@@ -72,11 +72,6 @@ *header =3D NO_COMPRESS_BYTE;
}

-#if defined(__GNUC= __) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"-#endif
-
static void
= lzo_decompress(struct buffer *buf, struct buffer work, struct compress_con= text *compctx,
const struct frame *frame)
@@ -107,7 +102,7 @@
}

ASSERT(buf_safe(&work, zlen));
= - work.len =3D zlen;
+ work.len =3D (int= )zlen;

dmsg(D_COMP, "LZO de= compress %d -> %d", buf->len, work.len);
= compctx->pre_decompress +=3D buf->len;
@@ -126,10 += 121,6 @@
}
}
=
-#if defined(__GNUC__) || def= ined(__clang__)
-#pragm= a GCC diagnostic pop
-#= endif
-
const struct compress_alg lzo_alg =3D { "lzo", lzo_compress_ini= t, lzo_compress_uninit, lzo_compress,

= lzo_decompress };
#endif /* ENABLE_LZO *= /

To view, visit change 1260. To unsubscrib= e, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4a5c46f321709c83a4a92136663= 0fb8e02834701
Gerrit-Change-Number: 1260
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...>
= --GsVEQJV242o=--