Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job

2018-03-17 Thread Junio C Hamano
Jeff King writes: > Unfortunately I think that's hard to do in pure make. But we're already > relying on $(shell) here, so we could just move the logic there. > > Something like the patch below, perhaps. It should do the right thing on > clang and gcc, and I added in an extra

Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job

2018-03-17 Thread Jeff King
On Sat, Mar 17, 2018 at 12:08:32PM -0400, Jeff King wrote: > +case "$($CC --version 2>&1)" in > +gcc*) > + print_flags gcc > + ;; > +clang*) > + print_flags clang > + ;; > +*) > + : unknown compiler family > + ;; > +esac By the way, one annoying thing is that running "cc

Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job

2018-03-17 Thread Jeff King
On Sat, Mar 17, 2018 at 03:59:23PM +0100, Duy Nguyen wrote: > On Sat, Mar 17, 2018 at 03:29:31PM +0100, Lars Schneider wrote: > > I interpreted Peff's comment like this: > > > > If DEVELOPER=1 is set and we detect a gcc-6 in the makefile, > > then we could set your additional flags in the

Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job

2018-03-17 Thread Jeff King
On Sat, Mar 17, 2018 at 03:29:31PM +0100, Lars Schneider wrote: > >> Why isn't this just turning on DEVELOPER=1 if we know we have a capable > >> compiler? > > > > DEVELOPER=1 is always set even before this patch. It's set and > > exported in lib-travisci.sh. > > I interpreted Peff's comment

Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job

2018-03-17 Thread Duy Nguyen
On Sat, Mar 17, 2018 at 03:29:31PM +0100, Lars Schneider wrote: > I interpreted Peff's comment like this: > > If DEVELOPER=1 is set and we detect a gcc-6 in the makefile, > then we could set your additional flags in the makefile. > > This way every developer with a new compiler would run these

Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job

2018-03-17 Thread Lars Schneider
> On 17 Mar 2018, at 09:01, Duy Nguyen wrote: > > On Fri, Mar 16, 2018 at 10:22 PM, Jeff King wrote: >>> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh >>> index 3735ce413f..f6f346c468 100755 >>> --- a/ci/run-build-and-tests.sh >>> +++

Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job

2018-03-17 Thread Duy Nguyen
On Fri, Mar 16, 2018 at 10:22 PM, Jeff King wrote: >> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh >> index 3735ce413f..f6f346c468 100755 >> --- a/ci/run-build-and-tests.sh >> +++ b/ci/run-build-and-tests.sh >> @@ -7,6 +7,22 @@ >> >> ln -s "$cache_dir/.prove"

Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job

2018-03-16 Thread Jeff King
On Fri, Mar 16, 2018 at 08:33:55PM +0100, Nguyễn Thái Ngọc Duy wrote: > We have DEVELOPER config to enable more warnings, but since we can't set > a fixed gcc version to all devs, that has to be a bit more conservative. > On travis, we know almost exact version to be used (bumped to 6.x for >

[PATCH v2] travis-ci: enable more warnings on travis linux-gcc job

2018-03-16 Thread Nguyễn Thái Ngọc Duy
We have DEVELOPER config to enable more warnings, but since we can't set a fixed gcc version to all devs, that has to be a bit more conservative. On travis, we know almost exact version to be used (bumped to 6.x for more warnings), we could be more aggressive. Signed-off-by: Nguyễn Thái Ngọc Duy