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>
This commit is contained in:
parent
b3a7b51f18
commit
eb930b8703
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user