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
a1b6427a97
commit
1a7ac2bd24
@ -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[])
|
||||
|
@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define BASEMODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | \
|
||||
S_IROTH | S_IWOTH
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static int f_mode;
|
||||
|
||||
|
@ -50,7 +50,7 @@ static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static const struct option long_opts[] = {
|
||||
{"directory", no_argument, NULL, 'd'},
|
||||
|
@ -99,7 +99,7 @@ static const struct mkuz_format uzip_fmts[] = {
|
||||
};
|
||||
|
||||
static struct mkuz_blk *readblock(int, u_int32_t);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static void cleanup(void);
|
||||
|
||||
static char *cleanfile = NULL;
|
||||
|
@ -180,7 +180,7 @@ static const struct commands {
|
||||
static const char *getblksiz(int);
|
||||
static void printreg(const char *, u_int, const char *);
|
||||
static void status(struct mtget *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
const char *get_driver_state_str(int dsreg);
|
||||
static void st_status (struct mtget *);
|
||||
static int mt_locate(int argc, char **argv, int mtfd, const char *tape);
|
||||
|
@ -192,7 +192,7 @@ static struct protox *protoprotox[] = {
|
||||
NULL };
|
||||
|
||||
static void printproto(struct protox *, const char *, bool *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static struct protox *name2protox(const char *);
|
||||
static struct protox *knownname(const char *);
|
||||
|
||||
|
@ -90,7 +90,7 @@ static char PKFILE[] = "/etc/publickey";
|
||||
static const char *err_string(int);
|
||||
#endif /* YP */
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@ -109,7 +109,7 @@ static int extra_output = 0;
|
||||
|
||||
static void intpr(int, int);
|
||||
static void printhdr(int, int, int);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static char *sperc1(int, int);
|
||||
static char *sperc2(int, int);
|
||||
static void exp_intpr(int, int, int);
|
||||
|
@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <unistd.h>
|
||||
|
||||
static void dofile(void);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
#define FILENAME "nohup.out"
|
||||
/*
|
||||
|
@ -65,7 +65,7 @@ static int delimcnt;
|
||||
static int parallel(char **);
|
||||
static int sequential(char **);
|
||||
static int tr(wchar_t *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static wchar_t tab[] = L"\t";
|
||||
|
||||
|
@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <locale.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
@ -86,7 +86,7 @@ struct quotause {
|
||||
|
||||
static char *timeprt(int64_t seconds);
|
||||
static struct quotause *getprivs(long id, int quotatype);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static int showuid(u_long uid);
|
||||
static int showgid(u_long gid);
|
||||
static int showusrname(char *name);
|
||||
|
@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include "randomize_fd.h"
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@ -64,7 +64,7 @@ static void clnt_output(const char *, const char *, int, const char * );
|
||||
static char *generate_guard(const char *);
|
||||
static void c_initialize(void);
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static void options_usage(void);
|
||||
static int do_registers(int, const char **);
|
||||
static int parseargs(int, const char **, struct commandline *);
|
||||
|
@ -71,7 +71,7 @@ static char *mbuf;
|
||||
static char notty[] = "no tty";
|
||||
|
||||
static void makemsg(const char *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
|
@ -83,7 +83,7 @@ static struct myutmp {
|
||||
static time_t now;
|
||||
static int aflg;
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
static int utmpcmp(const void *, const void *);
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user