Android/BluetoothServerPort: add missing "@Override" annotations
[xcsoar.git] / build / warnings.mk
blob9675328bcba68edac9f3f332c1b9c66e8f01392e
1 WARNINGS = -Wall -Wextra
2 WARNINGS += -Wwrite-strings -Wcast-qual -Wpointer-arith -Wsign-compare
3 WARNINGS += -Wundef
4 WARNINGS += -Wmissing-declarations
6 ifneq ($(TARGET),ANDROID)
7 WARNINGS += -Wredundant-decls
8 endif
10 CXXFLAGS += $(WARNINGS)
11 CXXFLAGS += -Wmissing-noreturn
13 # disable some warnings, we're not ready for them yet
14 CXXFLAGS += -Wno-unused-parameter
15 CXXFLAGS += -Wno-missing-field-initializers
16 CXXFLAGS += -Wcast-align
18 # plain C warnings
20 CFLAGS += $(WARNINGS)
21 CFLAGS += -Wmissing-prototypes -Wstrict-prototypes
23 ifneq ($(TARGET),ANDROID)
24 CFLAGS += -Wnested-externs
25 endif
27 # make warnings fatal (for perfectionists)
29 ifeq ($(WERROR),)
30 ifneq ($(TARGET),CYGWIN)
31 WERROR = $(DEBUG)
32 endif
33 endif
35 ifeq ($(WERROR),y)
36 CXXFLAGS += -Werror
37 CFLAGS += -Werror
38 endif
40 #CXXFLAGS += -pedantic
41 #CXXFLAGS += -pedantic-errors
43 # -Wdisabled-optimization
44 # -Wunused -Wshadow -Wunreachable-code
45 # -Wfloat-equal