]> git.ipfire.org Git - thirdparty/git.git/blame - config.mak.dev
refs API: make refs_read_raw_ref() not set errno
[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
ebd2e4a1 9
27e0c3c6 10DEVELOPER_CFLAGS += -Wall
6a8cbc41 11ifeq ($(filter no-pedantic,$(DEVOPTS)),)
6d5d4b4e 12DEVELOPER_CFLAGS += -pedantic
ebd2e4a1 13ifneq (($or $(filter gcc5,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),)
6a8cbc41 14DEVELOPER_CFLAGS += -Wpedantic
ebd2e4a1
CMAB
15ifneq ($(filter gcc10,$(COMPILER_FEATURES)),)
16ifeq ($(uname_S),MINGW)
6a8cbc41 17DEVELOPER_CFLAGS += -Wno-pedantic-ms-format
27e0c3c6 18endif
6d5d4b4e 19endif
ebd2e4a1
CMAB
20endif
21endif
6d5d4b4e
ÆAB
22DEVELOPER_CFLAGS += -Wdeclaration-after-statement
23DEVELOPER_CFLAGS += -Wformat-security
6d5d4b4e
ÆAB
24DEVELOPER_CFLAGS += -Wold-style-definition
25DEVELOPER_CFLAGS += -Woverflow
26DEVELOPER_CFLAGS += -Wpointer-arith
27DEVELOPER_CFLAGS += -Wstrict-prototypes
28DEVELOPER_CFLAGS += -Wunused
29DEVELOPER_CFLAGS += -Wvla
55391836 30DEVELOPER_CFLAGS += -fno-common
1da1580e 31
1da1580e 32ifneq ($(filter clang4,$(COMPILER_FEATURES)),)
6d5d4b4e 33DEVELOPER_CFLAGS += -Wtautological-constant-out-of-range-compare
1da1580e
NTND
34endif
35
36ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),)
6d5d4b4e 37DEVELOPER_CFLAGS += -Wextra
1da1580e
NTND
38# if a function is public, there should be a prototype and the right
39# header file should be included. If not, it should be static.
6d5d4b4e 40DEVELOPER_CFLAGS += -Wmissing-prototypes
26d2e4fb 41ifeq ($(filter extra-all,$(DEVOPTS)),)
1da1580e 42# These are disabled because we have these all over the place.
6d5d4b4e
ÆAB
43DEVELOPER_CFLAGS += -Wno-empty-body
44DEVELOPER_CFLAGS += -Wno-missing-field-initializers
45DEVELOPER_CFLAGS += -Wno-sign-compare
46DEVELOPER_CFLAGS += -Wno-unused-parameter
1da1580e 47endif
26d2e4fb 48endif
1da1580e
NTND
49
50# uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
51# not worth fixing since newer compilers correctly stop complaining
52ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
53ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
6d5d4b4e 54DEVELOPER_CFLAGS += -Wno-uninitialized
1da1580e
NTND
55endif
56endif
5338ed2b
JK
57
58GIT_TEST_PERL_FATAL_WARNINGS = YesPlease