Bruno Haible via Gnulib discussion list <[email protected]> writes:

> It helps reading the code when variables used for the same purpose, with the
> same semantics, have the same name.
>
> Currently:
>   - 87 files used 'saved_errno',
>   - 10 files use 'e',
>   - 6 files use 'err',
>   - 1 file uses 'save'.
>
> Since 'saved_errno' is widely used, descriptive, and unambiguous, there is
> some benefit to converging on this one.

I agree with the change. However, I see the following warning when
compiling Coreutils (not sharing command-line because it is even longer
than this message):

    lib/fts.c: In function 'fts_build':
    lib/fts.c:1353:25: warning: declaration of 'saved_errno' shadows a previous 
local [-Wshadow]
     1353 |                     int saved_errno = errno;
          |                         ^~~~~~~~~~~
    lib/fts.c:1278:13: note: shadowed declaration is here
     1278 |         int saved_errno;
          |             ^~~~~~~~~~~

I'm not going to apply a tiny patch to fix it, since it looks like your
refactor.diff.gz patch will take care of it by reducing it's scope.

Collin

Reply via email to