mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 10:19:04 +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
72e1ea2f13
commit
a9cce232a6
|
@ -47,7 +47,7 @@ static int format, verbose, show = 1, showfmt;
|
|||
static char *fmtstring;
|
||||
|
||||
static void showdev(enum fd_drivetype, const char *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
|
|
|
@ -66,7 +66,7 @@ static int flag_I = 1000000;
|
|||
printw(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static const char*
|
||||
el_prompt(void)
|
||||
|
|
|
@ -149,7 +149,7 @@ static int dflag = 0, Iflag = 0, Cflag = 0, Tflag = 0, oflag = 0, Kflag = 0;
|
|||
static int xflag = 0, zflag = 0;
|
||||
|
||||
/* local function declarations */
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static void needhdr(int signo);
|
||||
static void needresize(int signo);
|
||||
static void needreturn(int signo);
|
||||
|
@ -173,6 +173,7 @@ usage(void)
|
|||
fprintf(stderr, "usage: iostat [-CdhIKoTxz?] [-c count] [-M core]"
|
||||
" [-n devs] [-N system]\n"
|
||||
"\t [-t type,if,pass] [-w wait] [drives]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -261,8 +262,6 @@ main(int argc, char **argv)
|
|||
break;
|
||||
default:
|
||||
usage();
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ struct policyqueue {
|
|||
TAILQ_HEAD(policyhead, policyqueue);
|
||||
static struct policyhead policyhead;
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static void get_policy(void);
|
||||
static void dump_policy(void);
|
||||
static int mask2plen(struct sockaddr_in6 *);
|
||||
|
|
|
@ -73,7 +73,7 @@ static void print_jail(FILE *fp, struct cfjail *j, int oldcl, int running);
|
|||
static void print_param(FILE *fp, const struct cfparam *p, int sep, int doname);
|
||||
static void show_jails(void);
|
||||
static void quoted_print(FILE *fp, char *str);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static struct permspec perm_sysctl[] = {
|
||||
{ "security.jail.set_hostname_allowed", KP_ALLOW_SET_HOSTNAME, 0 },
|
||||
|
|
|
@ -138,7 +138,7 @@ static int delete(char *);
|
|||
static int dump(struct sockaddr_in6 *, int);
|
||||
static struct in6_nbrinfo *getnbrinfo(struct in6_addr *, int, int);
|
||||
static int ndp_ether_aton(char *, u_char *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static void ifinfo(char *, int, char **);
|
||||
static void rtrlist(void);
|
||||
static void plist(void);
|
||||
|
|
|
@ -281,7 +281,7 @@ static struct conf_entry *init_entry(const char *fname,
|
|||
struct conf_entry *src_entry);
|
||||
static void parse_args(int argc, char **argv);
|
||||
static int parse_doption(const char *doption);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static int log_trim(const char *logname, const struct conf_entry *log_ent);
|
||||
static int age_old_log(const char *file);
|
||||
static void savelog(char *from, char *to);
|
||||
|
|
|
@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
|
|||
|
||||
static void dump_lockstate(char *);
|
||||
static void dump_openstate(void);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static char *open_flags(uint32_t);
|
||||
static char *deleg_flags(uint32_t);
|
||||
static char *lock_flags(uint32_t);
|
||||
|
|
|
@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
|
|
@ -85,7 +85,7 @@ static void process_socket_event(struct kevent *, struct runtime_env *,
|
|||
static void process_timer_event(struct kevent *, struct runtime_env *,
|
||||
struct configuration *);
|
||||
static void *processing_thread(void *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
void get_time_func(struct timeval *);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
#define DEVICE_NAME (_PATH_DEV "powermac_nvram")
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static int remove_var(uint8_t *, int, const char *);
|
||||
static int append_var(uint8_t *, int, const char *, const char *);
|
||||
|
||||
|
|
Loading…
Reference in a new issue