Introduce error_exit as a noreturn variant of error (EXIT_FAILURE, ...)
authorMark Wielaard <mark@klomp.org>
Sun, 27 Mar 2022 19:08:36 +0000 (21:08 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 30 Mar 2022 14:40:05 +0000 (16:40 +0200)
commitdec6d82cf2e9c79b9b45a29de5ea2d8f25cc633b
tree2bc33be084fe10b7b404f9c05800a3bfcc9e92c4
parent4a22e01277e37540d753e3513c4df3bd2b6e1246
Introduce error_exit as a noreturn variant of error (EXIT_FAILURE, ...)

error (EXIT_FAILURE, ...) should be noreturn but on some systems it
isn't.  This may cause warnings about code that should not be
reachable.  So have an explicit error_exit wrapper that is noreturn
(because it calls exit explicitly).  Use error_exit in all tools under
the src directory.

https://bugzilla.redhat.com/show_bug.cgi?id=2068692

Signed-off-by: Mark Wielaard <mark@klomp.org>
14 files changed:
lib/ChangeLog
lib/system.h
src/ChangeLog
src/addr2line.c
src/ar.c
src/arlib.c
src/elfcompress.c
src/nm.c
src/objdump.c
src/readelf.c
src/size.c
src/strings.c
src/strip.c
src/unstrip.c