crypto/newhope: print values as unsigneds.
Otherwise builds fail with: crypto/newhope/newhope_statistical_test.cc:136:27: error: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat] Change-Id: I85d5816c1d7ee71eef362bffe983b2781ce310a4
This commit is contained in:
parent
6b7436b0d2
commit
77fe71101b
@ -133,9 +133,9 @@ static bool TestKeys(void) {
|
|||||||
uint64_t bits = NEWHOPE_KEY_LENGTH * 8 * kNumTests;
|
uint64_t bits = NEWHOPE_KEY_LENGTH * 8 * kNumTests;
|
||||||
uint64_t diff = bits - 2 * ones;
|
uint64_t diff = bits - 2 * ones;
|
||||||
double fraction = (double) abs(diff) / bits;
|
double fraction = (double) abs(diff) / bits;
|
||||||
printf("ones: %ld\n", ones);
|
printf("ones: %u\n", (unsigned) ones);
|
||||||
printf("zeroes: %ld\n", bits - ones);
|
printf("zeroes: %u\n", (unsigned) (bits - ones));
|
||||||
printf("diff: got %ld (%f), want %ld\n", diff, fraction, 0L);
|
printf("diff: got %u (%f), want %ld\n", (unsigned) diff, fraction, 0L);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if (fraction > 0.01) {
|
if (fraction > 0.01) {
|
||||||
|
Loading…
Reference in New Issue
Block a user