mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 15:25:58 +00:00
Use __attribute__((__noreturn__))
This commit is contained in:
5
compat.h
5
compat.h
@@ -36,6 +36,11 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* __P */
|
#endif /* __P */
|
||||||
|
|
||||||
|
/* Define away __attribute__ for non-gcc or old gcc */
|
||||||
|
#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 5
|
||||||
|
#define __attribute__(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some systems lack full limit definitions.
|
* Some systems lack full limit definitions.
|
||||||
*/
|
*/
|
||||||
|
6
sudo.c
6
sudo.c
@@ -103,8 +103,10 @@ static int init_vars __P((int));
|
|||||||
static int parse_args __P((int, char **));
|
static int parse_args __P((int, char **));
|
||||||
static void initial_setup __P((void));
|
static void initial_setup __P((void));
|
||||||
static void set_loginclass __P((struct passwd *));
|
static void set_loginclass __P((struct passwd *));
|
||||||
static void usage __P((int));
|
static void usage __P((int))
|
||||||
static void usage_excl __P((int));
|
__attribute__((__noreturn__));
|
||||||
|
static void usage_excl __P((int))
|
||||||
|
__attribute__((__noreturn__));
|
||||||
static struct passwd *get_authpw __P((void));
|
static struct passwd *get_authpw __P((void));
|
||||||
extern int sudo_edit __P((int, char **));
|
extern int sudo_edit __P((int, char **));
|
||||||
extern void list_matches __P((void));
|
extern void list_matches __P((void));
|
||||||
|
12
visudo.c
12
visudo.c
@@ -94,9 +94,11 @@ struct sudoersfile {
|
|||||||
/*
|
/*
|
||||||
* Function prototypes
|
* Function prototypes
|
||||||
*/
|
*/
|
||||||
static void usage __P((void));
|
static void usage __P((void))
|
||||||
|
__attribute__((__noreturn__));
|
||||||
static char whatnow __P((void));
|
static char whatnow __P((void));
|
||||||
static RETSIGTYPE Exit __P((int));
|
static RETSIGTYPE Exit __P((int))
|
||||||
|
__attribute__((__noreturn__));
|
||||||
static void setup_signals __P((void));
|
static void setup_signals __P((void));
|
||||||
static int run_command __P((char *, char **));
|
static int run_command __P((char *, char **));
|
||||||
static int check_syntax __P((char *));
|
static int check_syntax __P((char *));
|
||||||
@@ -112,8 +114,10 @@ int usergr_matches __P((char *, char *, struct passwd *));
|
|||||||
int userpw_matches __P((char *, char *, struct passwd *));
|
int userpw_matches __P((char *, char *, struct passwd *));
|
||||||
void yyerror __P((const char *));
|
void yyerror __P((const char *));
|
||||||
void yyrestart __P((FILE *));
|
void yyrestart __P((FILE *));
|
||||||
void Err __P((int, const char *, ...));
|
void Err __P((int, const char *, ...))
|
||||||
void Errx __P((int, const char *, ...));
|
__attribute__((__noreturn__));
|
||||||
|
void Errx __P((int, const char *, ...))
|
||||||
|
__attribute__((__noreturn__));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* External globals exported by the parser
|
* External globals exported by the parser
|
||||||
|
Reference in New Issue
Block a user