From 6fde066264e5cb784470e05c0ab6acbb16057bbc Mon Sep 17 00:00:00 2001 From: Alfonso Gregory Date: Fri, 7 Jul 2023 10:39:23 -0600 Subject: [PATCH] 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 --- tests/sys/cddl/zfs/bin/file_write.c | 2 +- tests/sys/netinet/libalias/perf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/cddl/zfs/bin/file_write.c b/tests/sys/cddl/zfs/bin/file_write.c index b1ef836879e..07ba6503dff 100644 --- a/tests/sys/cddl/zfs/bin/file_write.c +++ b/tests/sys/cddl/zfs/bin/file_write.c @@ -38,7 +38,7 @@ static unsigned char bigbuffer[BIGBUFFERSIZE]; * See header file for defaults. */ -static void usage(void); +static void usage(void) __dead2; static char *execname; int diff --git a/tests/sys/netinet/libalias/perf.c b/tests/sys/netinet/libalias/perf.c index f238846bdb1..07e73612a6d 100644 --- a/tests/sys/netinet/libalias/perf.c +++ b/tests/sys/netinet/libalias/perf.c @@ -38,7 +38,7 @@ #include "util.h" #include -static void usage(void); +static void usage(void) __dead2; #define timevalcmp(tv, uv, cmp) \ (((tv).tv_sec == (uv).tv_sec) \