]> git.ipfire.org Git - thirdparty/git.git/blame - config.mak.dev
parse-options.[ch]: revert use of "enum" for parse_options()
[thirdparty/git.git] / config.mak.dev
CommitLineData
27e0c3c6
CMAB
1ifndef COMPILER_FEATURES
2COMPILER_FEATURES := $(shell ./detect-compiler $(CC))
3endif
4
99f763ba 5ifeq ($(filter no-error,$(DEVOPTS)),)
6d5d4b4e 6DEVELOPER_CFLAGS += -Werror
521dc562 7SPARSE_FLAGS += -Wsparse-error
99f763ba 8endif
27e0c3c6 9DEVELOPER_CFLAGS += -Wall
6a8cbc41 10ifeq ($(filter no-pedantic,$(DEVOPTS)),)
6d5d4b4e 11DEVELOPER_CFLAGS += -pedantic
6a8cbc41 12DEVELOPER_CFLAGS += -Wpedantic
27e0c3c6 13ifneq ($(filter gcc5,$(COMPILER_FEATURES)),)
6a8cbc41 14DEVELOPER_CFLAGS += -Wno-pedantic-ms-format
27e0c3c6
CMAB
15DEVELOPER_CFLAGS += -Wno-incompatible-pointer-types
16endif
6d5d4b4e 17endif
6d5d4b4e
ÆAB
18DEVELOPER_CFLAGS += -Wdeclaration-after-statement
19DEVELOPER_CFLAGS += -Wformat-security
6d5d4b4e
ÆAB
20DEVELOPER_CFLAGS += -Wold-style-definition
21DEVELOPER_CFLAGS += -Woverflow
22DEVELOPER_CFLAGS += -Wpointer-arith
23DEVELOPER_CFLAGS += -Wstrict-prototypes
24DEVELOPER_CFLAGS += -Wunused
25DEVELOPER_CFLAGS += -Wvla
55391836 26DEVELOPER_CFLAGS += -fno-common
1da1580e 27
1da1580e 28ifneq ($(filter clang4,$(COMPILER_FEATURES)),)
6d5d4b4e 29DEVELOPER_CFLAGS += -Wtautological-constant-out-of-range-compare
1da1580e
NTND
30endif
31
32ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),)
6d5d4b4e 33DEVELOPER_CFLAGS += -Wextra
1da1580e
NTND
34# if a function is public, there should be a prototype and the right
35# header file should be included. If not, it should be static.
6d5d4b4e 36DEVELOPER_CFLAGS += -Wmissing-prototypes
26d2e4fb 37ifeq ($(filter extra-all,$(DEVOPTS)),)
1da1580e 38# These are disabled because we have these all over the place.
6d5d4b4e
ÆAB
39DEVELOPER_CFLAGS += -Wno-empty-body
40DEVELOPER_CFLAGS += -Wno-missing-field-initializers
41DEVELOPER_CFLAGS += -Wno-sign-compare
42DEVELOPER_CFLAGS += -Wno-unused-parameter
1da1580e 43endif
26d2e4fb 44endif
1da1580e
NTND
45
46# uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
47# not worth fixing since newer compilers correctly stop complaining
48ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
49ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
6d5d4b4e 50DEVELOPER_CFLAGS += -Wno-uninitialized
1da1580e
NTND
51endif
52endif
5338ed2b
JK
53
54GIT_TEST_PERL_FATAL_WARNINGS = YesPlease