]> git.ipfire.org Git - thirdparty/git.git/blob - config.mak.dev
gettext: remove optional non-standard parens in N_() definition
[thirdparty/git.git] / config.mak.dev
1 ifeq ($(filter no-error,$(DEVOPTS)),)
2 DEVELOPER_CFLAGS += -Werror
3 SPARSE_FLAGS += -Wsparse-error
4 endif
5 ifneq ($(filter pedantic,$(DEVOPTS)),)
6 DEVELOPER_CFLAGS += -pedantic
7 endif
8 DEVELOPER_CFLAGS += -Wall
9 DEVELOPER_CFLAGS += -Wdeclaration-after-statement
10 DEVELOPER_CFLAGS += -Wformat-security
11 DEVELOPER_CFLAGS += -Wold-style-definition
12 DEVELOPER_CFLAGS += -Woverflow
13 DEVELOPER_CFLAGS += -Wpointer-arith
14 DEVELOPER_CFLAGS += -Wstrict-prototypes
15 DEVELOPER_CFLAGS += -Wunused
16 DEVELOPER_CFLAGS += -Wvla
17 DEVELOPER_CFLAGS += -fno-common
18
19 ifndef COMPILER_FEATURES
20 COMPILER_FEATURES := $(shell ./detect-compiler $(CC))
21 endif
22
23 ifneq ($(filter clang4,$(COMPILER_FEATURES)),)
24 DEVELOPER_CFLAGS += -Wtautological-constant-out-of-range-compare
25 endif
26
27 ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),)
28 DEVELOPER_CFLAGS += -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.
31 DEVELOPER_CFLAGS += -Wmissing-prototypes
32 ifeq ($(filter extra-all,$(DEVOPTS)),)
33 # These are disabled because we have these all over the place.
34 DEVELOPER_CFLAGS += -Wno-empty-body
35 DEVELOPER_CFLAGS += -Wno-missing-field-initializers
36 DEVELOPER_CFLAGS += -Wno-sign-compare
37 DEVELOPER_CFLAGS += -Wno-unused-parameter
38 endif
39 endif
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
43 ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
44 ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
45 DEVELOPER_CFLAGS += -Wno-uninitialized
46 endif
47 endif
48
49 GIT_TEST_PERL_FATAL_WARNINGS = YesPlease