From: Michael D. Lowis Date: Mon, 10 Dec 2018 20:25:20 +0000 (-0500) Subject: added -Werror flag to build options X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=fabe218837894d6e30513ced69f61849a878ae98;p=projs%2Ftide.git added -Werror flag to build options --- diff --git a/config.mk b/config.mk index 835c8f5..dde9951 100644 --- a/config.mk +++ b/config.mk @@ -21,6 +21,7 @@ CC = cc CFLAGS = -g --std=c99 -MMD $(INCS) CFLAGS += -Wall -Wextra CFLAGS += -Wno-unused-function +CFLAGS += -Werror # Linker Setup LD = $(CC) @@ -32,16 +33,10 @@ ARFLAGS = rcs # Set the variables below or set them on the command line to enable the # corresponding feature -WERROR = 0 DEBUG = 0 GPROF = 0 GCOV = 0 -# Treat all warnings as errors (poor man's lint?) -ifeq ($(WERROR), 1) - CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter -endif - # GCC Debugging ifeq ($(DEBUG), 1) CFLAGS += -g -O0 @@ -59,16 +54,3 @@ ifeq ($(GCOV), 1) CFLAGS += --coverage LDFLAGS += --coverage endif - -# Clang Analyzers -ifeq ($(ANALYZERS), 1) - CFLAGS += --analyze -Xanalyzer -analyzer-output=text - LDFLAGS += --analyze -Xanalyzer -analyzer-output=text -endif - -# Clang Sanitizers -ifeq ($(SANITIZERS), 1) - CFLAGS += -fsanitize=address,dataflow,undefined -flto - LDFLAGS += -fsanitize=address,dataflow,undefined -flto -endif -