Avoid compiler errors for Android ARMv7.
(It complains that the comparison is always false with NDK r17 beta 2.)
Change-Id: I6b695fd0e86047f0c1e4267290e63db3184a958a
Reviewed-on: https://boringssl-review.googlesource.com/28025
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/d1_both.cc b/ssl/d1_both.cc
index f561332..d29af78 100644
--- a/ssl/d1_both.cc
+++ b/ssl/d1_both.cc
@@ -550,7 +550,7 @@
(1 << 8 * sizeof(ssl->d1->outgoing_messages_len)),
"outgoing_messages_len is too small");
if (ssl->d1->outgoing_messages_len >= SSL_MAX_HANDSHAKE_FLIGHT ||
- data.size() > 0xffffffff) {
+ static_cast<uint64_t>(data.size()) > 0xffffffff) {
assert(false);
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
return false;
diff --git a/ssl/s3_both.cc b/ssl/s3_both.cc
index ede4ba7..afc68ca 100644
--- a/ssl/s3_both.cc
+++ b/ssl/s3_both.cc
@@ -238,7 +238,7 @@
return -1;
}
- if (ssl->s3->pending_flight->length > 0xffffffff ||
+ if (static_cast<uint64_t>(ssl->s3->pending_flight->length) > 0xffffffff ||
ssl->s3->pending_flight->length > INT_MAX) {
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
return -1;