[Openvpn-devel,v1] GHA: Disable -Werror for MinGW 32bit

Message ID 20261116132828.31945-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v1] GHA: Disable -Werror for MinGW 32bit |

Commit Message

Gert Doering Nov. 16, 2026, 1:28 p.m. UTC
  From: Frank Lichtenheld <frank@lichtenheld.com>

There are some build failures related to -Wsign-conversion
now that look like clear bugs in MinGW. Since we do not plan
to support 32bit Windows going forward, let's not worry too
much about compiler warnings anymore. We will still detect if
we break the build completely, for now.

While investigating the issue, remove a wrong comment. With
-Wsign-conversion, all builds need the casts.

Change-Id: I6079f454e5bb1ce7c4ecc5343ce2231c417ca879
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Razvan Cojocaru <razvanc@mailbox.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2193
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2193
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <razvanc@mailbox.org>
  

Comments

Gert Doering Nov. 16, 2026, 2 p.m. UTC | #1
Thanks, this is better ;-) (as discussed on IRC, 32bit windows is going
to go away eventually, so we will not jump through hoops to appease the
compiler wrt warnings there in the meantime)

Tested via GHA, now the Windows build error goes away.  Android next.

Your patch has been applied to the master branch.

commit 38b0d5d07e5b0108bc8ffb789d82fa11c685c5f5
Author: Frank Lichtenheld
Date:   Mon Nov 16 14:28:23 2026 +0100

     GHA: Disable -Werror for MinGW 32bit

     Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
     Acked-by: Razvan Cojocaru <razvanc@mailbox.org>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2193
     Message-Id: <20261116132828.31945-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg41439.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering
  

Patch

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 27f08df..d50b7ff 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -81,6 +81,10 @@ 
         arch: [x86, x64]
         build: [Release, Debug]
 
+        include:
+         - arch: x86
+           configure-args: "['-DUSE_WERROR=OFF']"
+
     name: "gcc-mingw - ${{ matrix.arch }} - ${{ matrix.build }} - OSSL"
     runs-on: ubuntu-26.04
     env:
@@ -113,6 +117,7 @@ 
         uses: lukka/run-cmake@5d55ea7949e25f69f0ecb516d8d572297e03a956 # v10.9
         with:
           configurePreset: mingw-${{ matrix.arch }}
+          configurePresetAdditionalArgs: ${{ matrix.configure-args }}
           buildPreset: mingw-${{ matrix.arch }}
           buildPresetAdditionalArgs: "['--config ${{ matrix.build }}']"
 
diff --git a/src/openvpn/auth_token.c b/src/openvpn/auth_token.c
index 703a0b2..261c7c2 100644
--- a/src/openvpn/auth_token.c
+++ b/src/openvpn/auth_token.c
@@ -364,7 +364,6 @@ 
 
     /* Accept session tokens only if their timestamp is in the acceptable range
      * for renegotiations.
-     * Cast is required for systems with 32bit time_t, e.g. Windows x86.
      */
     const time_t token_reneg_deadline = (time_t)timestamp + 2 * session->opt->auth_token_renewal;
     bool in_renegotiation_time = now >= (time_t)timestamp && now < token_reneg_deadline;