Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression]

2018-01-04 Thread Tim Rühsen
On 01/04/2018 04:21 PM, Eric Blake wrote: > On 01/04/2018 03:45 AM, Tim Rühsen wrote: >> On 01/03/2018 10:29 PM, Eric Blake wrote: >>> We still use ChangeLog-style comments in the commit message (and/or >>> ChangeLog itself) for gnulib commits; it's also nice to call out which >>> previous commit t

Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression]

2018-01-04 Thread Eric Blake
On 01/04/2018 03:45 AM, Tim Rühsen wrote: > On 01/03/2018 10:29 PM, Eric Blake wrote: >> We still use ChangeLog-style comments in the commit message (and/or >> ChangeLog itself) for gnulib commits; it's also nice to call out which >> previous commit to cdefs.h already added protection for -Wundef >

Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression]

2018-01-04 Thread Bruno Haible
Tim Rühsen wrote: > Added GNU style commit message Thanks for the patch. Applied. Bruno

Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression]

2018-01-04 Thread Tim Rühsen
On 01/03/2018 10:29 PM, Eric Blake wrote: > We still use ChangeLog-style comments in the commit message (and/or > ChangeLog itself) for gnulib commits; it's also nice to call out which > previous commit to cdefs.h already added protection for -Wundef > compilation. But with those additions, I'm ok

Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression]

2018-01-03 Thread Paul Eggert
On 01/03/2018 01:29 PM, Eric Blake wrote: But with those additions, I'm okay with your patch; I'll > wait a day or so to see if anyone else chimes in. Looks good to me, too. Thanks.

Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression]

2018-01-03 Thread Eric Blake
On 01/03/2018 09:19 AM, Tim Rühsen wrote: >> and since cdefs.h is in that group, feel free to submit a patch to have >> the use of __USE_FORTIFY_LEVEL pacify -Wundef. > > There was a patch attached to email... Ah, I had overlooked it because you top-posted, and I didn't scroll past the quoted co

Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression]

2018-01-03 Thread Tim Rühsen
On 01/03/2018 04:07 PM, Eric Blake wrote: > On 01/03/2018 04:53 AM, Tim Rühsen wrote: >> ... here is another one in lib/cdef.h occurring with a MinGW build. >> >> >> In file included from ../lib/libc-config.h:149:0, >> from ../lib/glob.h:24, >> from utils.c:35: >>

-Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression]

2018-01-03 Thread Eric Blake
On 01/03/2018 04:53 AM, Tim Rühsen wrote: > ... here is another one in lib/cdef.h occurring with a MinGW build. > > > In file included from ../lib/libc-config.h:149:0, > from ../lib/glob.h:24, > from utils.c:35: > ../lib/cdefs.h:298:6: warning: "__USE_FORTIFY_LE

Re: [PATCH v2] stat-time: silence -Wunused-parameter regression

2018-01-03 Thread Tim Rühsen
... here is another one in lib/cdef.h occurring with a MinGW build. In file included from ../lib/libc-config.h:149:0, from ../lib/glob.h:24, from utils.c:35: ../lib/cdefs.h:298:6: warning: "__USE_FORTIFY_LEVEL" is not defined, evaluates to 0 [-Wundef] # if __US

Re: [PATCH v2] stat-time: silence -Wunused-parameter regression

2018-01-02 Thread Paul Eggert
Jim Meyering wrote: Thanks. That sounds like the right approach. We have to hold user-included headers to a higher standard. Right, I missed that. Thanks, Eric.

Re: [PATCH v2] stat-time: silence -Wunused-parameter regression

2018-01-02 Thread Jim Meyering
On Tue, Jan 2, 2018 at 1:56 PM, Eric Blake wrote: > Commit 2c5d5587 causes warnings on non-Sun systems when compiled > under -Wunused-parameter; we've previously tweaked code in commit > 81eb8486 to avoid such warnings. Prefer an attribute rather than > a cast to void (the attribute is always oka

[PATCH v2] stat-time: silence -Wunused-parameter regression

2018-01-02 Thread Eric Blake
Commit 2c5d5587 causes warnings on non-Sun systems when compiled under -Wunused-parameter; we've previously tweaked code in commit 81eb8486 to avoid such warnings. Prefer an attribute rather than a cast to void (the attribute is always okay to apply; gcc interprets it as 'may be unused', not 'must