File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,12 @@ addons:
21
21
22
22
env :
23
23
global :
24
+ - DEVELOPER=1
24
25
- P4_VERSION="15.2"
25
26
- GIT_LFS_VERSION="1.1.0"
26
27
- DEFAULT_TEST_TARGET=prove
27
28
- GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
28
29
- GIT_TEST_OPTS="--verbose --tee"
29
- - CFLAGS="-g -O2 -Wall -Werror"
30
30
- GIT_TEST_CLONE_2GB=YesPlease
31
31
# t9810 occasionally fails on Travis CI OS X
32
32
# t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X
Original file line number Diff line number Diff line change @@ -171,6 +171,11 @@ For C programs:
171
171
172
172
- We try to keep to at most 80 characters per line.
173
173
174
+ - As a Git developer we assume you have a reasonably modern compiler
175
+ and we recommend you to enable the DEVELOPER makefile knob to
176
+ ensure your patch is clear of all compiler warnings we care about,
177
+ by e.g. "echo DEVELOPER=1 >>config.mak".
178
+
174
179
- We try to support a wide range of C compilers to compile Git with,
175
180
including old ones. That means that you should not use C99
176
181
initializers, even if a lot of compilers grok it.
Original file line number Diff line number Diff line change @@ -380,6 +380,18 @@ ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
380
380
ALL_LDFLAGS = $(LDFLAGS )
381
381
STRIP ?= strip
382
382
383
+ ifdef DEVELOPER
384
+ CFLAGS += -Werror \
385
+ -Wdeclaration-after-statement \
386
+ -Wno-format-zero-length \
387
+ -Wold-style-definition \
388
+ -Woverflow \
389
+ -Wpointer-arith \
390
+ -Wstrict-prototypes \
391
+ -Wunused \
392
+ -Wvla
393
+ endif
394
+
383
395
# Create as necessary, replace existing, make ranlib unneeded.
384
396
ARFLAGS = rcs
385
397
You can’t perform that action at this time.
0 commit comments