commit 3ba0a2ed9248c03ceb66583587fba9b20c77747a from: Stefan Sperling date: Sun Sep 20 21:07:20 2020 UTC enable -Wstrict-prototype and -Wunused-variable in Linux build commit - cc5f4ee87bcb16d81774bfa1a89ccc53ea0213e2 commit + 3ba0a2ed9248c03ceb66583587fba9b20c77747a blob - 4a731caaebd2a420a2569b29e1e157c5a2376fc5 blob + 873ca8d5ceddb912a44260d6afd6ee413d6dc1a3 --- diff/GNUmakefile +++ diff/GNUmakefile @@ -1,4 +1,5 @@ CFLAGS = -fsanitize=address -fsanitize=undefined -g -O3 +CFLAGS += -Wstrict-prototypes -Wunused-variable diff: diff.c ../lib/libdiff.a gcc $(CFLAGS) -I../include -o $@ $^ blob - 1b73588ad91574f34bbc3bae3a71a2665b76aa8d blob + 1c42ceb0c7f7c6486d031ba90ed8c5c3acc44345 --- diff/diff.c +++ diff/diff.c @@ -36,7 +36,7 @@ /* stupid shims to compile and test on linux */ #define __dead -static const char *getprogname() +static inline const char *getprogname(void) { return "diff"; } blob - a6ff8bd1ed65c0db6c0feaf7866523a9d9f52948 blob + 6db035bb5ae10656a0f6d64973fdd775550f65b3 --- lib/GNUmakefile +++ lib/GNUmakefile @@ -14,6 +14,7 @@ libdiff.a: $(objs) ar rcs $@ $^ CFLAGS = -fsanitize=address -fsanitize=undefined -g -O3 +CFLAGS += -Wstrict-prototypes -Wunused-variable %.o: %.c ./*.h ../include/diff/*.h gcc $(CFLAGS) -I../include -o $@ -c $<