[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] maint: pacify GCC 6 with -Wnull-dereference
From: |
Pádraig Brady |
Subject: |
Re: [PATCH 2/2] maint: pacify GCC 6 with -Wnull-dereference |
Date: |
Wed, 27 Jul 2016 15:27:57 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 27/07/16 11:40, Bernhard Voelker wrote:
> On 07/27/2016 11:35 AM, Pádraig Brady wrote:
>> Hrm, I wonder should we have an errorx to wrap error (EXIT_FAILURE, ...)
>> and that can be marked as noreturn? I.E. stick this somewhere?
>
> Well, it seems there are only a couple of places where error() is followed
> by exit():
>
> $ git grep -FA2 'error (' | grep -F 'exit ('
> src/id.c- exit (EXIT_FAILURE);
> src/ptx.c- exit (EXIT_FAILURE);
> src/seq.c- exit (EXIT_FAILURE);
> src/shred.c- atexit (clear_random_data);
> src/sort.c- exit (SORT_FAILURE);
> src/test.c- test_exit (TEST_FAILURE);
> src/whoami.c- exit (EXIT_FAILURE);
>
> Therefore, I'd leave it more explicitly and readable rather than
> inventing another wrapper to remember.
>
> Have a nice day,
> Berny
>
+1