Renderer, ...: use PixelRect::GetCenter()
[xcsoar.git] / build / warnings.mk
blobc4aa67375633eb3606bcebfcbd73c97d8e5aa805
1 WARNINGS = -Wall -Wextra
2 WARNINGS += -Wwrite-strings -Wcast-qual -Wpointer-arith -Wsign-compare
3 WARNINGS += -Wundef
4 WARNINGS += -Wmissing-declarations
5 WARNINGS += -Wredundant-decls
7 CXXFLAGS += $(WARNINGS)
8 CXXFLAGS += -Wmissing-noreturn
10 # disable some warnings, we're not ready for them yet
11 CXXFLAGS += -Wno-unused-parameter
12 CXXFLAGS += -Wno-missing-field-initializers
13 CXXFLAGS += -Wcast-align
15 # plain C warnings
17 CFLAGS += $(WARNINGS)
18 CFLAGS += -Wmissing-prototypes -Wstrict-prototypes
19 CFLAGS += -Wnested-externs
21 # make warnings fatal (for perfectionists)
23 ifneq ($(TARGET),CYGWIN)
24 WERROR ?= $(DEBUG)
25 endif
27 ifeq ($(WERROR),y)
28 CXXFLAGS += -Werror
29 CFLAGS += -Werror
30 endif
32 #CXXFLAGS += -pedantic
33 #CXXFLAGS += -pedantic-errors
35 # -Wdisabled-optimization
36 # -Wunused -Wshadow -Wunreachable-code
37 # -Wfloat-equal