[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Jim Meyering
Subject: Re: [PATCH v2] stat-time: silence -Wunused-parameter regression
Date: Tue, 2 Jan 2018 17:27:39 -0800

On Tue, Jan 2, 2018 at 1:56 PM, Eric Blake <address@hidden> 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 okay to apply; gcc
> interprets it as 'may be unused', not 'must not be used', precisely
> to cater to #if chains where determining whether or not the
> parameter is used gets hairy).
> * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime):
> Prefer attribute over cast-to-void.
> (stat_time_normalize): Mark st as potentially unused.

Thanks. That sounds like the right approach. We have to hold
user-included headers to a higher standard.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]