Remove unreachable code to make -Wunreachable-code on clang useful.

This commit is contained in:
Alex Young
2014-02-24 11:23:09 +00:00
parent 50ec8fb7cc
commit 374b4c616e
5 changed files with 13 additions and 12 deletions

View File

@@ -12,7 +12,15 @@ else
CFLAGS_EXTRA=-O2
endif
CCFLAGS=-D_GNU_SOURCE=1 -Wall -Wextra -Werror-implicit-function-declaration -Wstrict-prototypes -Wno-missing-field-initializers $(CFLAGS_EXTRA) $(CFLAGS)
# The -Wunreachable-code warning is only implemented in clang, but it
# doesn't break anything for gcc to see it.
WARNINGS=-Wall \
-Wextra \
-Werror-implicit-function-declaration \
-Wstrict-prototypes \
-Wno-missing-field-initializers \
-Wunreachable-code
CCFLAGS=-D_GNU_SOURCE=1 $(WARNINGS) $(CFLAGS_EXTRA) $(CFLAGS)
LLDFLAGS=-lrt -lev $(LDFLAGS_EXTRA) $(LDFLAGS)
CC?=gcc