Place C23 attributes before keywords in function declarations.
In practice this means we must use "sudo_noreturn static foo(void)" instead of "static sudo_noreturn foo(void)".
This commit is contained in:
@@ -349,7 +349,7 @@ closefrom_nodebug(int lowfd)
|
||||
|
||||
#define MAX_MAILFLAGS 63
|
||||
|
||||
static sudo_noreturn void
|
||||
sudo_noreturn static void
|
||||
exec_mailer(int pipein)
|
||||
{
|
||||
const struct eventlog_config *evl_conf = eventlog_getconf();
|
||||
|
@@ -87,8 +87,6 @@ static struct option long_opts[] = {
|
||||
};
|
||||
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
static sudo_noreturn void help(void);
|
||||
static sudo_noreturn void usage(void);
|
||||
static bool convert_sudoers_sudoers(struct sudoers_parse_tree *parse_tree, const char *output_file, struct cvtsudoers_config *conf);
|
||||
static bool parse_sudoers(const char *input_file, struct cvtsudoers_config *conf);
|
||||
static bool parse_ldif(struct sudoers_parse_tree *parse_tree, const char *input_file, struct cvtsudoers_config *conf);
|
||||
@@ -101,6 +99,8 @@ static void filter_userspecs(struct sudoers_parse_tree *parse_tree, struct cvtsu
|
||||
static void filter_defaults(struct sudoers_parse_tree *parse_tree, struct cvtsudoers_config *conf);
|
||||
static void alias_remove_unused(struct sudoers_parse_tree *parse_tree);
|
||||
static void alias_prune(struct sudoers_parse_tree *parse_tree, struct cvtsudoers_config *conf);
|
||||
sudo_noreturn static void help(void);
|
||||
sudo_noreturn static void usage(void);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@@ -175,8 +175,6 @@ extern time_t get_date(char *);
|
||||
static int list_sessions(int, char **, const char *, const char *, const char *);
|
||||
static int parse_expr(struct search_node_list *, char **, bool);
|
||||
static void read_keyboard(int fd, int what, void *v);
|
||||
static sudo_noreturn void help(void);
|
||||
static sudo_noreturn void usage(void);
|
||||
static int replay_session(int iolog_dir_fd, const char *iolog_dir,
|
||||
struct timespec *offset, struct timespec *max_wait, const char *decimal,
|
||||
bool interactive, bool suspend_wait);
|
||||
@@ -184,6 +182,8 @@ static void sudoreplay_cleanup(void);
|
||||
static void write_output(int fd, int what, void *v);
|
||||
static void restore_terminal_size(void);
|
||||
static void setup_terminal(struct eventlog *evlog, bool interactive, bool resize);
|
||||
sudo_noreturn static void help(void);
|
||||
sudo_noreturn static void usage(void);
|
||||
|
||||
#define VALID_ID(s) (isalnum((unsigned char)(s)[0]) && \
|
||||
isalnum((unsigned char)(s)[1]) && isalnum((unsigned char)(s)[2]) && \
|
||||
|
@@ -61,12 +61,12 @@ enum sudoers_formats {
|
||||
* Function Prototypes
|
||||
*/
|
||||
static void dump_sudoers(struct sudo_lbuf *lbuf);
|
||||
static sudo_noreturn void usage(void);
|
||||
static void set_runaspw(const char *);
|
||||
static void set_runasgr(const char *);
|
||||
static bool cb_runas_default(const char *file, int line, int column, const union sudo_defs_val *, int);
|
||||
static int testsudoers_error(const char *msg);
|
||||
static int testsudoers_output(const char *buf);
|
||||
sudo_noreturn static void usage(void);
|
||||
|
||||
/* testsudoers_pwutil.c */
|
||||
extern struct cache_item *testsudoers_make_gritem(gid_t gid, const char *group);
|
||||
|
@@ -50,10 +50,10 @@ union timestamp_entry_storage {
|
||||
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
static sudo_noreturn void usage(void);
|
||||
static void dump_entry(struct timestamp_entry *entry, off_t pos);
|
||||
static bool valid_entry(union timestamp_entry_storage *u, off_t pos);
|
||||
static bool convert_entry(union timestamp_entry_storage *record, struct timespec *off);
|
||||
sudo_noreturn static void usage(void);
|
||||
|
||||
/*
|
||||
* tsdump: a simple utility to dump the contents of a time stamp file.
|
||||
|
@@ -96,9 +96,9 @@ static bool reparse_sudoers(char *, int, char **, bool, bool);
|
||||
static int run_command(const char *, char *const *);
|
||||
static void parse_sudoers_options(void);
|
||||
static void setup_signals(void);
|
||||
static sudo_noreturn void help(void);
|
||||
static sudo_noreturn void usage(void);
|
||||
static void visudo_cleanup(void);
|
||||
sudo_noreturn static void help(void);
|
||||
sudo_noreturn static void usage(void);
|
||||
|
||||
extern void get_hostname(void);
|
||||
|
||||
|
@@ -47,9 +47,9 @@ int tgetpass_flags;
|
||||
/*
|
||||
* Local functions.
|
||||
*/
|
||||
static sudo_noreturn void help(void);
|
||||
static sudo_noreturn void usage_excl(void);
|
||||
static sudo_noreturn void usage_excl_ticket(void);
|
||||
sudo_noreturn static void help(void);
|
||||
sudo_noreturn static void usage_excl(void);
|
||||
sudo_noreturn static void usage_excl_ticket(void);
|
||||
|
||||
/*
|
||||
* Mapping of command line flags to name/value settings.
|
||||
|
@@ -179,7 +179,7 @@ try_wordexp(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static sudo_noreturn void
|
||||
sudo_noreturn static void
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "usage: %s [-v] rexec | /path/to/sudo_noexec.so\n",
|
||||
|
Reference in New Issue
Block a user