Skip to content

Commit

Permalink
Enable more warnings and fix some minor issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
aparent committed Aug 25, 2016
1 parent e261ce8 commit 11e98de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CURL=curl
RANLIB=ranlib
LN=ln -s

DEFAULTS= -std=gnu11 -Wpedantic -Wall -DOQS_RAND_DEFAULT_URANDOM_CHACHA20 -DOQS_KEX_DEFAULT_BCNS15
DEFAULTS= -std=gnu11 -Wpedantic -Wall -Wextra -DOQS_RAND_DEFAULT_URANDOM_CHACHA20 -DOQS_KEX_DEFAULT_BCNS15
CFLAGS=$(DEFAULTS) -DCONSTANT_TIME
LDFLAGS=-lm
INCLUDES=-Iinclude
Expand Down
2 changes: 1 addition & 1 deletion src/kex/test_kex.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static int kex_test_correctness(OQS_RAND *rand, OQS_KEX *(*new_method)(OQS_RAND
}

/* record generated bytes for statistical analysis */
for (int i = 0; i < alice_key_len; i++) {
for (size_t i = 0; i < alice_key_len; i++) {
OQS_RAND_test_record_occurrence(alice_key[i], occurrences);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rand/test_rand.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static void rand_test_distribution_32(OQS_RAND *rand, unsigned long occurrences[
for (int i = 0; i < iterations; i++) {
x = OQS_RAND_32(rand);
uint8_t b;
for (int j = 0; j < sizeof(uint32_t); j++) {
for (size_t j = 0; j < sizeof(uint32_t); j++) {
b = (x >> j) & 0xFF;
OQS_RAND_test_record_occurrence(b, occurrences);
}
Expand All @@ -32,7 +32,7 @@ static void rand_test_distribution_64(OQS_RAND *rand, unsigned long occurrences[
for (int i = 0; i < iterations; i++) {
x = OQS_RAND_64(rand);
uint8_t b;
for (int j = 0; j < sizeof(uint64_t); j++) {
for (size_t j = 0; j < sizeof(uint64_t); j++) {
b = (x >> j) & 0xFF;
OQS_RAND_test_record_occurrence(b, occurrences);
}
Expand Down

0 comments on commit 11e98de

Please sign in to comment.