[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: |
Eric Blake |
Subject: |
Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression] |
Date: |
Thu, 4 Jan 2018 09:21:11 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
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.
At any rate, since your commit is already applied to gnulib.git, we
don't have to worry about enhancing the commit message to include any
further git archaeology.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [PATCH v2] stat-time: silence -Wunused-parameter regression, (continued)
- [PATCH v2] stat-time: silence -Wunused-parameter regression, Eric Blake, 2018/01/02
- 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 <=
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Tim Rühsen, 2018/01/04
Re: [PATCH] Avoid one "parameter unused" warnings., Bruno Haible, 2018/01/01