Skip to content

Commit

Permalink
Enable -Wall
Browse files Browse the repository at this point in the history
  • Loading branch information
veqtrus committed Feb 15, 2021
1 parent cd0895c commit 4cf6429
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
13 changes: 5 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
WARNINGS := -pedantic -Wcast-align -Wpointer-arith \
-Wbad-function-cast -Wmissing-prototypes -Wstrict-aliasing \
-Wmissing-declarations -Winline -Wnested-externs -Wcast-qual \
-Wshadow -Wwrite-strings -Wno-unused-parameter -Wfloat-equal
CFLAGS := -std=c99 -O2 $(WARNINGS)
WARNINGS ?= -pedantic -Wall
CFLAGS ?= -std=c99 -O2 $(WARNINGS)
CC ?= gcc

SOURCES := aes.c
Expand All @@ -18,10 +15,10 @@ check: build/test build/bench
build/test
build/bench

build:
mkdir -p build
build/:
mkdir build

build/%: %.c $(SOURCES) build
build/%: %.c $(SOURCES) build/
$(CC) -o $@ $< $(SOURCES) $(CFLAGS)

aes.c: aes.h
2 changes: 1 addition & 1 deletion aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static void galois_mult_gcm(const uint32_t *h, uint8_t *x)
h0 = h[0], h1 = h[1], h2 = h[2], h3 = h[3],
r0 = 0, r1 = 0, r2 = 0, r3 = 0;
unsigned i;
uint8_t b;
uint8_t b = 0;
for (i = 0; i < 128; ++i) {
b = (i & 7) ? (b << 1) : x[i / 8];
m = 0;
Expand Down
2 changes: 1 addition & 1 deletion clib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vial_aes",
"version": "0.2.0",
"version": "0.2.1",
"repo": "veqtrus/vial_aes",
"description": "Permissively licensed AES implementation in C with ECB, CBC, CTR, GCM, and EAX modes of operation, as well as CMAC (OMAC1)",
"keywords": ["cryptography", "aes", "encryption", "mac"],
Expand Down

0 comments on commit 4cf6429

Please sign in to comment.