coreutils
[Top][All Lists]
Advanced

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

Re: avoid new GCC-7-exposed warnings


From: Pádraig Brady
Subject: Re: avoid new GCC-7-exposed warnings
Date: Sun, 16 Oct 2016 20:13:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 16/10/16 19:50, Jim Meyering wrote:
> On Sat, Oct 15, 2016 at 3:57 PM, Pádraig Brady <address@hidden> wrote:
>> On 15/10/16 18:11, Pádraig Brady wrote:
>>> I'll do the follow up patch to use [die] in more places.
>>
>> A boring copy/replace patch:
>> 84 files changed, 875 insertions(+), 800 deletions(-)
>> (extra insertions are the inclusion of die.h)
>>
>> One interesting bit is a new syntax check:
>>
>> # Usage of error() with an constant to exit() with, should instead use die(),
>> # as that avoids warnings and may generate better code, due to being apparent
>> # to the compiler that it doesn't return.
>> sc_die_EXIT_FAILURE:
>>        @cd $(srcdir)/src && GIT_PAGER= git grep -E \
>>            'error \(.*_(FAILURE|INVALID)' \
>>          && { echo '$(ME): '"Use die() instead of error" 1>&2; \
>>               exit 1; }  \
>>          || :
>>
>> will push later...
> 
> Thanks.
> Here's one more change I'll push today. It removes a few now-useless
> calls to "abort" after die, and by a similar token, removes some
> "break;" statements after abort:

looks good.

thanks




reply via email to

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