[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoid new GCC-7-exposed warnings
From: |
Jim Meyering |
Subject: |
Re: avoid new GCC-7-exposed warnings |
Date: |
Sun, 16 Oct 2016 11:50:58 -0700 |
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:
cu-unreachable.diff
Description: Text document
- avoid new GCC-7-exposed warnings, Jim Meyering, 2016/10/15
- Re: avoid new GCC-7-exposed warnings, Pádraig Brady, 2016/10/15
- Re: avoid new GCC-7-exposed warnings, Jim Meyering, 2016/10/15
- Re: avoid new GCC-7-exposed warnings, Pádraig Brady, 2016/10/15
- Re: avoid new GCC-7-exposed warnings, Pádraig Brady, 2016/10/15
- Re: avoid new GCC-7-exposed warnings,
Jim Meyering <=
- Re: avoid new GCC-7-exposed warnings, Pádraig Brady, 2016/10/16
- Re: avoid new GCC-7-exposed warnings, Jim Meyering, 2016/10/16