]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix various sign-compare warnings due to write return value
authorFrank Lichtenheld <frank@lichtenheld.com>
Fri, 6 Mar 2026 16:33:31 +0000 (17:33 +0100)
committerGert Doering <gert@greenie.muc.de>
Sat, 7 Mar 2026 09:08:17 +0000 (10:08 +0100)
commit0401eacfe255ccd7b41fa594e004fddeb8ba1a24
treeecad3e518925e161acbc9ddb1b062323dc16101d
parent5f7b1c548b69e0ba0c54bfb63c94243c4ffaea97
Fix various sign-compare warnings due to write return value

write takes size_t as count (unsigned int on
Windows) and returns ssize_t (int on Windows).
But we often want to compare the return value
to the count.

Generally we can just rely on the fact that
sizeof(ssize_t) == sizeof(size_t) and use that
for all values. (Until we want to introduce
-Wsign-conversion that is...)

Change-Id: I3eb4581980f532cb2960b37a6fa43a7baee4b603
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1513
Message-Id: <20260306163337.2756-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35963.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ps.c
src/openvpn/status.c
src/plugins/auth-pam/auth-pam.c