Documentation: add Packfile URIs design doc
[git.git] / config.mak.dev
blobcd4a82a9eb4a2b0a4a1d45f0186cd7f858a0ff57
1 ifeq ($(filter no-error,$(DEVOPTS)),)
2 DEVELOPER_CFLAGS += -Werror
3 endif
4 ifneq ($(filter pedantic,$(DEVOPTS)),)
5 DEVELOPER_CFLAGS += -pedantic
6 # don't warn for each N_ use
7 DEVELOPER_CFLAGS += -DUSE_PARENS_AROUND_GETTEXT_N=0
8 endif
9 DEVELOPER_CFLAGS += -Wall
10 DEVELOPER_CFLAGS += -Wdeclaration-after-statement
11 DEVELOPER_CFLAGS += -Wformat-security
12 DEVELOPER_CFLAGS += -Wold-style-definition
13 DEVELOPER_CFLAGS += -Woverflow
14 DEVELOPER_CFLAGS += -Wpointer-arith
15 DEVELOPER_CFLAGS += -Wstrict-prototypes
16 DEVELOPER_CFLAGS += -Wunused
17 DEVELOPER_CFLAGS += -Wvla
19 DEVELOPER_CFLAGS += -DENABLE_SHA256
21 ifndef COMPILER_FEATURES
22 COMPILER_FEATURES := $(shell ./detect-compiler $(CC))
23 endif
25 ifneq ($(filter clang4,$(COMPILER_FEATURES)),)
26 DEVELOPER_CFLAGS += -Wtautological-constant-out-of-range-compare
27 endif
29 ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),)
30 DEVELOPER_CFLAGS += -Wextra
31 # if a function is public, there should be a prototype and the right
32 # header file should be included. If not, it should be static.
33 DEVELOPER_CFLAGS += -Wmissing-prototypes
34 ifeq ($(filter extra-all,$(DEVOPTS)),)
35 # These are disabled because we have these all over the place.
36 DEVELOPER_CFLAGS += -Wno-empty-body
37 DEVELOPER_CFLAGS += -Wno-missing-field-initializers
38 DEVELOPER_CFLAGS += -Wno-sign-compare
39 DEVELOPER_CFLAGS += -Wno-unused-parameter
40 endif
41 endif
43 # uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
44 # not worth fixing since newer compilers correctly stop complaining
45 ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
46 ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
47 DEVELOPER_CFLAGS += -Wno-uninitialized
48 endif
49 endif