Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-05-27 20:15:33 +0300
committerAdam Langley <agl@google.com>2015-05-28 01:04:16 +0300
commiteb930b87032bce94efd2c54e8d843f283231f6fd (patch)
tree7cd8e3162fab054cf5544a3a2c9be4bd2f32f08e /crypto/bn/bn_test.cc
parentb3a7b51f18dd192c911c6239e521d7cec62d2340 (diff)
Fix signed/unsigned warning in bn_test.cc.
BN_num_bits returns unsigned. Change-Id: Ie346dbe0a12d3597d2b12e56b57dfc147e65dcc3 Reviewed-on: https://boringssl-review.googlesource.com/4895 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/bn/bn_test.cc')
-rw-r--r--crypto/bn/bn_test.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/bn/bn_test.cc b/crypto/bn/bn_test.cc
index 01460abb..6dd87ecd 100644
--- a/crypto/bn/bn_test.cc
+++ b/crypto/bn/bn_test.cc
@@ -1351,14 +1351,15 @@ static bool test_mod_sqrt(FILE *fp, BN_CTX *ctx) {
}
static bool test_small_prime(FILE *fp, BN_CTX *ctx) {
- static const int kBits = 10;
+ static const unsigned kBits = 10;
ScopedBIGNUM r(BN_new());
- if (!r || !BN_generate_prime_ex(r.get(), kBits, 0, NULL, NULL, NULL)) {
+ if (!r || !BN_generate_prime_ex(r.get(), static_cast<int>(kBits), 0, NULL,
+ NULL, NULL)) {
return false;
}
if (BN_num_bits(r.get()) != kBits) {
- fprintf(fp, "Expected %d bit prime, got %d bit number\n", kBits,
+ fprintf(fp, "Expected %u bit prime, got %u bit number\n", kBits,
BN_num_bits(r.get()));
return false;
}