From: Christian Göttsche Date: Mon, 11 Dec 2023 17:12:24 +0000 (+0100) Subject: src/chfn,chpasswd,newusers: declare fatal_exit() NORETURN X-Git-Tag: 4.15.0-rc1~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c39b1319442d10d1630f94d11e13b4687e62fc9;p=thirdparty%2Fshadow.git src/chfn,chpasswd,newusers: declare fatal_exit() NORETURN Help static analyzers to understand fatal_exit() does never return. --- diff --git a/src/chfn.c b/src/chfn.c index 417ac35f1..4c68bf235 100644 --- a/src/chfn.c +++ b/src/chfn.c @@ -57,7 +57,7 @@ static bool pw_locked = false; */ /* local function prototypes */ -static void fail_exit (int code); +NORETURN static void fail_exit (int code); NORETURN static void usage (int status); static bool may_change_field (int); static void new_fields (void); diff --git a/src/chpasswd.c b/src/chpasswd.c index 1a1a5d599..8bc920e44 100644 --- a/src/chpasswd.c +++ b/src/chpasswd.c @@ -61,7 +61,7 @@ static bool pw_locked = false; static bool spw_locked = false; /* local function prototypes */ -static void fail_exit (int code); +NORETURN static void fail_exit (int code); NORETURN static void usage (int status); static void process_flags (int argc, char **argv); static void check_flags (void); diff --git a/src/newusers.c b/src/newusers.c index 08f797985..81eab640e 100644 --- a/src/newusers.c +++ b/src/newusers.c @@ -90,8 +90,8 @@ static bool sub_gid_locked = false; #endif /* ENABLE_SUBIDS */ /* local function prototypes */ -static void usage (int status); -static void fail_exit (int); +NORETURN static void usage (int status); +NORETURN static void fail_exit (int); static int add_group (const char *, const char *, gid_t *, gid_t); static int get_user_id (const char *, uid_t *); static int add_user (const char *, uid_t, gid_t);