[PATCH applied] Re: mingw: avoid C99 hh scanf length modifier

Gert Doering <[email protected]> Thu, 23 Jul 2026 22:43:30 +0200 (CEST)
Newsgroups gmane.network.openvpn.devel
Message-ID <[email protected]>
I find the whole explanation behind this highly confusing, and I find it
even more amazing that we have no "parse_hex_byte_ex()" function in all
of our codebase and have to resort to scanf()... - but whatever, the
new code is not much uglier than before, the scanf() actually more
readable (because no macro involved), and it works on all MinGW versions...

parse_hexstring() comes with a unit test, and that still passes, so
"tested well enough" :-) - also compile tested with whatever MinGW
version I have here + GHA.

Your patch has been applied to the master and release/2.7 branch
(long-term compat)

commit 035a88f97b1ffdc88497faeaa0aeb8a72e1eaf4f (master)
commit 326bd05d3db9be075091cd12b7a7c7c798ef9a7e (release/2.7)
Author: Heiko Hund
Date:   Wed Jul 8 20:56:53 2026 +0200

     mingw: avoid C99 hh scanf length modifier

     Signed-off-by: Heiko Hund <[email protected]>
     Acked-by: Frank Lichtenheld <[email protected]>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1733
     Message-Id: <[email protected]>
     URL: https://www.mail-archive.com/[email protected]/msg37544.html
     Signed-off-by: Gert Doering <[email protected]>


--
kind regards,

Gert Doering