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
5c3b5af6a2
commit
498a0a9c61
@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <unistd.h>
|
||||
|
||||
static void asa(FILE *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@ -1026,7 +1026,7 @@ static char print[DWIDTH];
|
||||
static int debug, i, j, linen, max, nchars, pc, term, trace, x, y;
|
||||
static int width = DWIDTH; /* -w option: scrunch letters to 80 columns */
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@ -70,7 +70,7 @@ extern int main_base64_encode(const char *, const char *);
|
||||
static void encode(void);
|
||||
static void base64_encode(void);
|
||||
static int arg_to_col(const char *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static FILE *output;
|
||||
static int mode;
|
||||
|
@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
|
||||
static int elftype(const char *);
|
||||
static const char *iselftype(int);
|
||||
static void printelftypes(void);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
struct ELFtypes {
|
||||
const char *str;
|
||||
|
@ -50,7 +50,7 @@ static u_int cargs, nargs;
|
||||
|
||||
static void addarg(const char *);
|
||||
static void addlib(const char *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@ -145,7 +145,7 @@ static int say_next, hup_next;
|
||||
|
||||
void *dup_mem(void *b, size_t c);
|
||||
void *copy_of(char *s);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
void chat_logf(const char *fmt, ...);
|
||||
void fatal(int code, const char *fmt, ...);
|
||||
SIGTYPE sigalrm(int signo);
|
||||
|
@ -74,7 +74,7 @@ static char PKFILE[] = "/etc/publickey";
|
||||
#endif /* YP */
|
||||
static char ROOTKEY[] = "/etc/.rootkey";
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
extern int yp_update(char *, char *, int, char *, size_t, char *, size_t);
|
||||
|
||||
int
|
||||
|
@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
@ -86,7 +86,7 @@ siginfo(int signo)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
static bool
|
||||
parse_iskipspec(char *spec, off_t *skip1, off_t *skip2)
|
||||
|
@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define TAB 8
|
||||
|
||||
void check(FILE *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@ -69,7 +69,7 @@ static id_t id;
|
||||
static cpulevel_t level;
|
||||
static cpuwhich_t which;
|
||||
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
struct numa_policy {
|
||||
const char *name;
|
||||
|
@ -87,7 +87,7 @@ char lbuf[LINE_MAX];
|
||||
|
||||
void init(void);
|
||||
void find_entries(char *);
|
||||
static void usage(void);
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
Loading…
Reference in New Issue
Block a user