[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-paramete
From: |
Tim Rühsen |
Subject: |
Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression] |
Date: |
Thu, 4 Jan 2018 16:34:45 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
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 to cdefs.h already added protection for -Wundef
>>> compilation. But with those additions, I'm okay with your patch; I'll
>>> wait a day or so to see if anyone else chimes in.
>>
>> Added GNU style commit message, unsure what you mean with "which
>> previous commit to cdefs.h already added protection for -Wundef".
>> Can't find any (from commit messages).
>
> Here's what I did in the recent commit 3206134a:
>
> 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.
>
> I found those commit ids by using git gui blame. For your patch, I note
> that cdefs.h already has -Wundef protection on __GNUC__ (this is the
> command I used to generate examples mentioned earlier in the thread:
> git grep '# *if.*defined \([A-Z0-9_]*\) .*\1' lib/*.h
> ); so I did a blame to see where that protection was first added; but it
> appears that
>
> #if defined __GNUC__ && __GNUC__ >= 2
>
> was present in that file since its introduction in commit 38885c86, and
> not something added after the fact in a later gnulib commit.
Thanks for sharing.
My (maybe over-)simplified approach was
git log lib/cdefs.h
and to read the commit messages - and they didn't mention an explicit
-Wundef protection.
Regards, Tim
signature.asc
Description: OpenPGP digital signature
- Re: [PATCH v2] stat-time: silence -Wunused-parameter regression, (continued)
- Re: [PATCH v2] stat-time: silence -Wunused-parameter regression, Jim Meyering, 2018/01/02
- Re: [PATCH v2] stat-time: silence -Wunused-parameter regression, Paul Eggert, 2018/01/02
- Re: [PATCH v2] stat-time: silence -Wunused-parameter regression, Tim Rühsen, 2018/01/03
- -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Eric Blake, 2018/01/03
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Tim Rühsen, 2018/01/03
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Eric Blake, 2018/01/03
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Paul Eggert, 2018/01/03
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Tim Rühsen, 2018/01/04
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Bruno Haible, 2018/01/04
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Eric Blake, 2018/01/04
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression],
Tim Rühsen <=
Re: [PATCH] Avoid one "parameter unused" warnings., Bruno Haible, 2018/01/01