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 1133f93 commit dd30ef8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions 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 All @@ -26,7 +26,7 @@ links:
# CHACHA

CHACHA_OBJS := $(addprefix objs/rand_urandom_chacha20/, \
rand_urandom_chacha20.o chacha20.o)
rand_urandom_chacha20.o)

$(CHACHA_OBJS): src/rand_urandom_chacha20/rand_urandom_chacha20.h src/rand_urandom_chacha20/chacha20.c

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 dd30ef8

Please sign in to comment.