git: 498a0a9c61c3 - main - Mark usage function as __dead2 in programs where it does not return
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Jul 2023 16:51:10 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=498a0a9c61c3048b492937ff76d58bbd0b78031a
commit 498a0a9c61c3048b492937ff76d58bbd0b78031a
Author: Alfonso Gregory <gfunni234@gmail.com>
AuthorDate: 2023-07-07 16:39:23 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-07-07 16:45:18 +0000
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
---
usr.bin/asa/asa.c | 2 +-
usr.bin/banner/banner.c | 2 +-
usr.bin/biff/biff.c | 2 +-
usr.bin/bintrans/uuencode.c | 2 +-
usr.bin/brandelf/brandelf.c | 2 +-
usr.bin/c99/c99.c | 2 +-
usr.bin/chat/chat.c | 2 +-
usr.bin/chkey/chkey.c | 2 +-
usr.bin/cksum/cksum.c | 2 +-
usr.bin/cmp/cmp.c | 2 +-
usr.bin/colrm/colrm.c | 2 +-
usr.bin/cpuset/cpuset.c | 2 +-
usr.bin/ctags/ctags.c | 2 +-
13 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/usr.bin/asa/asa.c b/usr.bin/asa/asa.c
index a6c3d7d7c1e5..4491beeead04 100644
--- a/usr.bin/asa/asa.c
+++ b/usr.bin/asa/asa.c
@@ -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[])
diff --git a/usr.bin/banner/banner.c b/usr.bin/banner/banner.c
index 3d887ae6d4f1..b28c5e440281 100644
--- a/usr.bin/banner/banner.c
+++ b/usr.bin/banner/banner.c
@@ -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[])
diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c
index 70372d57a041..ad238b951366 100644
--- a/usr.bin/biff/biff.c
+++ b/usr.bin/biff/biff.c
@@ -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[])
diff --git a/usr.bin/bintrans/uuencode.c b/usr.bin/bintrans/uuencode.c
index cb3669dd55d0..a0e1406c3648 100644
--- a/usr.bin/bintrans/uuencode.c
+++ b/usr.bin/bintrans/uuencode.c
@@ -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;
diff --git a/usr.bin/brandelf/brandelf.c b/usr.bin/brandelf/brandelf.c
index 505bd09f39d7..c95f2aef806e 100644
--- a/usr.bin/brandelf/brandelf.c
+++ b/usr.bin/brandelf/brandelf.c
@@ -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;
diff --git a/usr.bin/c99/c99.c b/usr.bin/c99/c99.c
index deabdf49f02c..a1752e6f4540 100644
--- a/usr.bin/c99/c99.c
+++ b/usr.bin/c99/c99.c
@@ -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[])
diff --git a/usr.bin/chat/chat.c b/usr.bin/chat/chat.c
index 059aa2483292..ec558a615901 100644
--- a/usr.bin/chat/chat.c
+++ b/usr.bin/chat/chat.c
@@ -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);
diff --git a/usr.bin/chkey/chkey.c b/usr.bin/chkey/chkey.c
index 4751a284b384..55d34bcc0fc3 100644
--- a/usr.bin/chkey/chkey.c
+++ b/usr.bin/chkey/chkey.c
@@ -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
diff --git a/usr.bin/cksum/cksum.c b/usr.bin/cksum/cksum.c
index 5da560582366..6634bd1903d0 100644
--- a/usr.bin/cksum/cksum.c
+++ b/usr.bin/cksum/cksum.c
@@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$");
#include "extern.h"
-static void usage(void);
+static void usage(void) __dead2;
int
main(int argc, char **argv)
diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c
index 82f34803fc22..a71565760a83 100644
--- a/usr.bin/cmp/cmp.c
+++ b/usr.bin/cmp/cmp.c
@@ -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)
diff --git a/usr.bin/colrm/colrm.c b/usr.bin/colrm/colrm.c
index a0969281dd14..739b184b6e6c 100644
--- a/usr.bin/colrm/colrm.c
+++ b/usr.bin/colrm/colrm.c
@@ -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[])
diff --git a/usr.bin/cpuset/cpuset.c b/usr.bin/cpuset/cpuset.c
index 1dee12b06ec3..43aadb33f1e0 100644
--- a/usr.bin/cpuset/cpuset.c
+++ b/usr.bin/cpuset/cpuset.c
@@ -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;
diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c
index d94b6e87ae1b..9b5139f08be1 100644
--- a/usr.bin/ctags/ctags.c
+++ b/usr.bin/ctags/ctags.c
@@ -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)