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] Avoid one "parameter unused" warnings.

2018-01-01 Thread Paul Eggert
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, on the grounds that the apostrophe could be a typo an

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

2018-01-01 Thread Michal Privoznik
On 01/01/2018 07:41 PM, Paul Eggert wrote: > Michal Privoznik wrote: >> I'm failing to see why this would be a >> false positive. > > It's a false positive in the sense that there is no bug here. That is, > the Gnulib patch would mean that we would be spending maintenance effort > to complicate co

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

2018-01-01 Thread Paul Eggert
Michal Privoznik wrote: I'm failing to see why this would be a false positive. It's a false positive in the sense that there is no bug here. That is, the Gnulib patch would mean that we would be spending maintenance effort to complicate code merely to pacify a compiler, not to fix a real prob

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

2018-01-01 Thread Michal Privoznik
On 01/01/2018 10: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. Can you elaborate on this please? I'm failing to see why t

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

2018-01-01 Thread Bruno Haible
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) > } > } > #endif > + /* Avoid a "parameter unused

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

2018-01-01 Thread Paul Eggert
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 days ago, starting here: http://lists.gnu.org/arc

[PATCH] Avoid one "parameter unused" warnings.

2018-01-01 Thread Michal Privoznik
* lib/stat-time.h (stat_time_normalize): Mark "st" as used. Signed-off-by: Michal Privoznik --- lib/stat-time.h | 2 ++ 1 file changed, 2 insertions(+) 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 @