| Message ID | 20260306163010.2437-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers | show |
| Series | [Openvpn-devel,v3] tls_crypt: Avoid a sign-compare warning | expand |
.. as it says on the lid :-)
Your patch has been applied to the master branch.
commit 660340e9be501a31ff4c7bd3fa2e1bea6026e48f
Author: Frank Lichtenheld
Date: Fri Mar 6 17:30:04 2026 +0100
tls_crypt: Avoid a sign-compare warning
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1524
Message-Id: <20260306163010.2437-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35959.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c index c2b6268..70889dc 100644 --- a/src/openvpn/tls_crypt.c +++ b/src/openvpn/tls_crypt.c @@ -206,11 +206,6 @@ return false; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif - bool tls_crypt_unwrap(const struct buffer *src, struct buffer *dst, struct crypto_options *opt) { @@ -728,7 +723,7 @@ msg(M_FATAL, "ERROR: failed to base64 decode provided metadata"); goto cleanup; } - if (decoded_len > TLS_CRYPT_V2_MAX_METADATA_LEN - 1) + if ((unsigned int)decoded_len > TLS_CRYPT_V2_MAX_METADATA_LEN - 1) { msg(M_FATAL, "ERROR: metadata too long (%d bytes, max %u bytes)", decoded_len, TLS_CRYPT_V2_MAX_METADATA_LEN - 1); @@ -801,7 +796,3 @@ gc_free(&gc); } - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif