On 31/01/2022 20:16, Paul Eggert wrote:
I went through a lint pass for Coreutils and installed the attached patches. These fix only one or two real (albeit unlikely and/or technical) bugs. Most of them remove "#ifdef lint"s or "IF_LINT"s that should no longer be needed with modern GCC and runtimes, the idea being to lessen the difference between linted and unlinted code.
Note if there is no functional change, it's better to use a git summary line of the form "maint: ..." (and also squash similar patches if possible)
If you're building with older GCC and/or non-GCC you may run into a few glitches, which you can ignore with "make WERROR_CFLAGS=" or with "./configure --disable-gcc-warnings" (the default unless you're building from Git). The biggest lint-oriented change here is the new macro 'main_exit', which should be used only in main functions and is equivalent to either 'exit' or 'return', depending on whether we're pacifying gcc -fsanitize=leak. Using this macro helped me to eliminate a lot of 'IF_LINT (free (x))' calls.
We used returns to work with single binary mode. $ ./configure --enable-single-binary --quiet $ make src/expr.c: In function 'single_binary_main_expr': error: function might be candidate for attribute 'noreturn' [-Werror=suggest-attribute=noreturn] note: in definition of macro 'main'
