Declare usage and failure handler noreturn

Assist static analyzers in understanding final code paths.
This commit is contained in:
Christian Göttsche
2023-01-26 22:08:43 +01:00
committed by Iker Pedrosa
parent 1aaa4ec5ba
commit 35edae5892
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ static bool sgr_locked = false;
static bool gr_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);
+1 -1
View File
@@ -71,7 +71,7 @@ static void display_members (const char *const *members);
NORETURN static void usage (int status);
static void process_flags (int argc, char **argv);
static void check_perms (void);
static void fail_exit (int code);
NORETURN static void fail_exit (int code);
#define isroot() (getuid () == 0)
static char *whoami (void)
+1
View File
@@ -433,6 +433,7 @@ static void prepare_pam_close_session (void)
/*
* usage - print command line syntax and exit
*/
NORETURN
static void usage (int status)
{
(void)
+2 -2
View File
@@ -205,13 +205,13 @@ static bool home_added = false;
#define DLOG_INIT "LOG_INIT="
/* local function prototypes */
static void fail_exit (int);
NORETURN static void fail_exit (int);
static void get_defaults (void);
static void show_defaults (void);
static int set_defaults (void);
static int get_groups (char *);
static struct group * get_local_group (char * grp_name);
static void usage (int status);
NORETURN static void usage (int status);
static void new_pwent (struct passwd *);
static long scale_age (long);