]> git.ipfire.org Git - thirdparty/git.git/blame - config.mak.dev
Merge branch 'ag/rebase-i-in-c'
[thirdparty/git.git] / config.mak.dev
CommitLineData
99f763ba 1ifeq ($(filter no-error,$(DEVOPTS)),)
1da1580e 2CFLAGS += -Werror
99f763ba 3endif
729b3925
BB
4ifneq ($(filter pedantic,$(DEVOPTS)),)
5CFLAGS += -pedantic
6# don't warn for each N_ use
7CFLAGS += -DUSE_PARENS_AROUND_GETTEXT_N=0
8endif
1da1580e 9CFLAGS += -Wdeclaration-after-statement
801fa63a 10CFLAGS += -Wformat-security
1da1580e
NTND
11CFLAGS += -Wno-format-zero-length
12CFLAGS += -Wold-style-definition
13CFLAGS += -Woverflow
14CFLAGS += -Wpointer-arith
15CFLAGS += -Wstrict-prototypes
16CFLAGS += -Wunused
17CFLAGS += -Wvla
18
19ifndef COMPILER_FEATURES
20COMPILER_FEATURES := $(shell ./detect-compiler $(CC))
21endif
22
23ifneq ($(filter clang4,$(COMPILER_FEATURES)),)
24CFLAGS += -Wtautological-constant-out-of-range-compare
25endif
26
27ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),)
28CFLAGS += -Wextra
29# if a function is public, there should be a prototype and the right
30# header file should be included. If not, it should be static.
31CFLAGS += -Wmissing-prototypes
26d2e4fb 32ifeq ($(filter extra-all,$(DEVOPTS)),)
1da1580e
NTND
33# These are disabled because we have these all over the place.
34CFLAGS += -Wno-empty-body
35CFLAGS += -Wno-missing-field-initializers
36CFLAGS += -Wno-sign-compare
1da1580e
NTND
37CFLAGS += -Wno-unused-parameter
38endif
26d2e4fb 39endif
1da1580e
NTND
40
41# uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
42# not worth fixing since newer compilers correctly stop complaining
43ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
44ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
45CFLAGS += -Wno-uninitialized
46endif
47endif