]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/chfn,chpasswd,newusers: declare fatal_exit() NORETURN
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 11 Dec 2023 17:12:24 +0000 (18:12 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 14 Dec 2023 13:40:40 +0000 (07:40 -0600)
Help static analyzers to understand fatal_exit() does never return.

src/chfn.c
src/chpasswd.c
src/newusers.c

index 417ac35f1c1468228c93672ddf445dc4888b8f4b..4c68bf2353a621a50637d6505e121634e46e5a1f 100644 (file)
@@ -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);
index 1a1a5d59985448a7a3990c78e692d217a2c71ff5..8bc920e44b8c6c6f754feda9f01f98fc0cd45a69 100644 (file)
@@ -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);
index 08f7979852bddee5e7e22310ccf9a4310d4755b9..81eab640eff3cadd81ab162a8304bef1af32c436 100644 (file)
@@ -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);