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/+/1524?usp=email
to review the following change.
Change subject: tls_crypt: Avoid a sign-compare warning
......................................................................
tls_crypt: Avoid a sign-compare warning
We already checked that this isn't negative
so just use a cast.
Change-Id: Ibc7a6d8c61b9e584bf5d2d13fb5072b7a28fc53b
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M src/openvpn/tls_crypt.c
1 file changed, 1 insertion(+), 10 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/24/1524/1
diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c
index 44aaad9..92acbc0 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
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1524?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ibc7a6d8c61b9e584bf5d2d13fb5072b7a28fc53b
Gerrit-Change-Number: 1524
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel