coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] maint: pacify GCC 6 with -Wnull-dereference


From: Bernhard Voelker
Subject: Re: [PATCH 2/2] maint: pacify GCC 6 with -Wnull-dereference
Date: Wed, 27 Jul 2016 12:40:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2

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



reply via email to

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