mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +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
cccdaf507e
commit
72e1ea2f13
|
@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
|
@ -90,7 +90,7 @@ static void nuke_entries(uint32_t ifindex, struct in_addr addr);
|
|||
static int print_entries(uint32_t ifindex, struct in_addr addr);
|
||||
|
||||
static int delete(char *host);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static int set(int argc, char **argv);
|
||||
static int get(char *host);
|
||||
static int file(char *name);
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
static int do_bthid_command(bdaddr_p bdaddr, int argc, char **argv);
|
||||
static struct bthid_command * find_bthid_command(char const *command, struct bthid_command *category);
|
||||
static void print_bthid_command(struct bthid_command *category);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int32_t hid_sdp_query(bdaddr_t const *local, bdaddr_t const *remote, int32_t *error);
|
||||
|
||||
|
|
|
@ -72,9 +72,9 @@ static const struct {
|
|||
{ "GN", SDP_SERVICE_CLASS_GN, "Group Network" },
|
||||
};
|
||||
|
||||
static void main_exit(int);
|
||||
static void main_exit(int) __dead2;
|
||||
static void main_detach(void);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
|
@ -107,7 +107,7 @@ static int boot0bs(const u_int8_t *);
|
|||
static void stropt(const char *, int *, int *);
|
||||
static int argtoi(const char *, int, int, int);
|
||||
static int set_bell(u_int8_t *, int, int);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static unsigned vol_id[5]; /* 4 plus 1 for flag */
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ const char *bootpfile = "/etc/bootparams";
|
|||
|
||||
static struct sockaddr_in my_addr;
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
|
|
@ -30,7 +30,7 @@ static char cln[MAX_MACHINE_NAME+1];
|
|||
static char dmn[MAX_MACHINE_NAME+1];
|
||||
static char path[MAX_PATH_LEN+1];
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
int printgetfile(bp_getfile_res *);
|
||||
int printwhoami(bp_whoami_res *);
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ static unsigned int optfmt(const char *);
|
|||
static uint32_t optaddr(const char *);
|
||||
static int optpage(const char *, int);
|
||||
static void Warn(const char *, const char *, ...);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
/*
|
||||
* A link editor for BTX clients.
|
||||
|
|
|
@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
|
@ -86,7 +86,7 @@ static const char *stripath(const char *path);
|
|||
static int distfile(const char *path);
|
||||
static int disttype(const char *name);
|
||||
static int fail(const char *path, const char *msg);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
|
@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$");
|
|||
|
||||
static const char *pname = "crunchide";
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static void add_to_keep_list(char *symbol);
|
||||
static void add_file_to_keep_list(char *filename);
|
||||
|
|
|
@ -110,7 +110,7 @@ struct quotause *getprivs(long, int, char *);
|
|||
void putprivs(long, struct quotause *);
|
||||
int readprivs(struct quotause *, char *);
|
||||
int readtimes(struct quotause *, char *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
int writetimes(struct quotause *, int, int);
|
||||
int writeprivs(struct quotause *, int, char *, int);
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
|
|||
|
||||
static void efi_table_print_esrt(const void *data);
|
||||
static void efi_table_print_prop(const void *data);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
struct efi_table_op {
|
||||
char name[TABLE_MAX_LEN];
|
||||
|
|
Loading…
Reference in a new issue