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