Build system: Add a few -Werror for sane C development

This commit is contained in:
Thiago Macieira
2021-09-03 12:54:10 -07:00
parent 5910b7def3
commit e2a4ed135c
2 changed files with 9 additions and 2 deletions
+4 -1
View File
@@ -236,7 +236,10 @@ tag: distcheck
.SECONDARY:
cflags := $(CPPFLAGS) -I$(SRCDIR)src
cflags += -std=gnu99 $(CFLAGS)
cflags += -std=gnu99 $(CFLAGS) \
-Werror=incompatible-pointer-types \
-Werror=implicit-function-declaration \
-Werror=int-conversion
%.o: %.c
@test -d $(@D) || $(MKDIR) $(@D)
$(CC) $(cflags) $($(basename $(notdir $@))_CCFLAGS) -c -o $@ $<
+5 -1
View File
@@ -1,6 +1,10 @@
TEMPLATE = lib
CONFIG += static
CONFIG += static warn_on
CONFIG -= qt
DESTDIR = ../lib
!msvc:QMAKE_CFLAGS += \
-Werror=incompatible-pointer-types \
-Werror=implicit-function-declaration \
-Werror=int-conversion
include(src.pri)