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