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

Re: [PATCH] Avoid one "parameter unused" warnings.

2018-01-02 Thread Eric Blake
On 01/01/2018 03:53 AM, Paul Eggert wrote: > Thanks, but -Wunused-parameter issues so many false alarms that I think > I'd rather just ask people to compile with -Wno-unused-parameter. That's > what coreutils does, and Emacs, and so forth. > > By the way, this thread duplicates one of a couple of

Re: [PATCH] Avoid one "parameter unused" warnings.

2018-01-02 Thread Eric Blake
On 01/01/2018 03:55 AM, Bruno Haible wrote: > Hi, > > Michal Privoznik wrote: >> diff --git a/lib/stat-time.h b/lib/stat-time.h >> index 5f8bf4e12..11acbfb1f 100644 >> --- a/lib/stat-time.h >> +++ b/lib/stat-time.h >> @@ -244,6 +244,8 @@ stat_time_normalize (int result, struct stat *st) >>

Re: [PATCH] Avoid one "parameter unused" warnings.

2018-01-02 Thread Michal Privoznik
On 01/02/2018 08:38 AM, Paul Eggert wrote: > Michal Privoznik wrote: > >> it's not a false positive either > > It depends on what we're looking for. I'm looking for bugs. To take an > extreme example, if GCC warned about every character string literal > containing an unescaped ASCII apostrophe, o

Re: [PATCH] update-copyright: add code to handle more special cases

2018-01-02 Thread Paul Eggert
Thanks for doing that. It can be a challenge improving programs that are run only once a year. I'm reminded of the Long Now's clock: http://longnow.org/clock/ which has even longer-term debugging issues.