mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-14 12:23:58 +00:00
Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
This commit is contained in:
parent
498a0a9c61
commit
a1b6427a97
|
@ -56,7 +56,7 @@ static bool edit_file_features(Elf *, int, int, char *, bool);
|
|||
static bool get_file_features(Elf *, int, int, uint32_t *, uint64_t *, bool);
|
||||
static void print_features(void);
|
||||
static bool print_file_features(Elf *, int, int, char *, bool);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
struct ControlFeatures {
|
||||
const char *alias;
|
||||
|
|
|
@ -473,7 +473,7 @@ static void elf_print_got(Elf32_Ehdr *e, void *sh);
|
|||
static void elf_print_hash(Elf32_Ehdr *e, void *sh);
|
||||
static void elf_print_note(Elf32_Ehdr *e, void *sh);
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
/*
|
||||
* Helpers for ELF files with shnum or shstrndx values that don't fit in the
|
||||
|
|
2
usr.bin/env/env.c
vendored
2
usr.bin/env/env.c
vendored
|
@ -62,7 +62,7 @@ extern char **environ;
|
|||
|
||||
int env_verbosity;
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
/*
|
||||
* Exit codes.
|
||||
|
|
|
@ -71,7 +71,7 @@ int mindepth = -1, maxdepth = -1; /* minimum and maximum depth */
|
|||
int regexp_flags = REG_BASIC; /* use the "basic" regexp by default*/
|
||||
int exitstatus;
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
|
@ -98,7 +98,7 @@ int invoker_root = 0;
|
|||
|
||||
static void loginlist(void);
|
||||
static int option(int, char **);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static void userlist(int, char **);
|
||||
|
||||
static int
|
||||
|
|
|
@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$");
|
|||
|
||||
void fold(int);
|
||||
static int newpos(int, wint_t);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static int bflag; /* Count bytes, not columns */
|
||||
static int sflag; /* Split on word boundaries */
|
||||
|
|
|
@ -126,7 +126,7 @@ static int stable_collate_range_cmp(int, int);
|
|||
static void do_order(void);
|
||||
static void getargs(int, char **);
|
||||
static void randomize(void);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
/*
|
||||
* main:
|
||||
|
|
|
@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <unistd.h>
|
||||
|
||||
static int match(const char *, const char *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
|
|
@ -43,7 +43,7 @@ static void set(int, int);
|
|||
static void standt(int);
|
||||
static void movto(int, int);
|
||||
static void sighndl(int);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static void
|
||||
sighndl(int signo)
|
||||
|
|
|
@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
|
|||
static void head(FILE *, intmax_t);
|
||||
static void head_bytes(FILE *, off_t);
|
||||
static void obsolete(char *[]);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static const struct option long_opts[] =
|
||||
{
|
||||
|
|
|
@ -114,7 +114,7 @@ static void outoneline(INPUT *, LINE *);
|
|||
static void outtwoline(INPUT *, LINE *, INPUT *, LINE *);
|
||||
static void slurp(INPUT *);
|
||||
static wchar_t *towcs(const char *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
|
@ -67,7 +67,7 @@ static int pid;
|
|||
|
||||
static void no_ktrace(int);
|
||||
static void set_pid_clear(const char *, enum clear);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
|
@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
|
|||
#define USAGE \
|
||||
"usage: ktrdump [-cflqrtH] [-i ktrfile] [-M core] [-N system] [-o outfile]\n"
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static struct nlist nl[] = {
|
||||
{ .n_name = "_ktr_version" },
|
||||
|
|
|
@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <unistd.h>
|
||||
|
||||
static void doalarm(u_int);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
/*
|
||||
* leave [[+]hhmm]
|
||||
|
|
|
@ -257,7 +257,7 @@ static struct {
|
|||
#define RCS_STRING "tfdscmlunbvpwko"
|
||||
|
||||
static rlim_t resource_num(int which, int ch, const char *str);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static int getshelltype(void);
|
||||
static void print_limit(rlim_t limit, unsigned divisor, const char *inf,
|
||||
const char *pfx, const char *sfx, const char *which);
|
||||
|
|
|
@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$");
|
|||
static void quit(int);
|
||||
static void bye(int);
|
||||
static void hi(int);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static struct timeval timeout;
|
||||
static struct timeval zerotime;
|
||||
|
|
|
@ -44,7 +44,7 @@ static int acquire_lock(const char *name, int flags);
|
|||
static void cleanup(void);
|
||||
static void killed(int sig);
|
||||
static void timeout(int sig);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static void wait_for_lock(const char *name);
|
||||
|
||||
static const char *lockname;
|
||||
|
|
|
@ -89,7 +89,7 @@ static int look(wchar_t *, unsigned char *, unsigned char *);
|
|||
static wchar_t *prepkey(const char *, wchar_t);
|
||||
static void print_from(wchar_t *, unsigned char *, unsigned char *);
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static struct option longopts[] = {
|
||||
{ "alternative",no_argument, NULL, 'a' },
|
||||
|
|
Loading…
Reference in a new issue