From nobody Fri Jul 07 16:51:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKD20vJZz4m3Gb; Fri, 7 Jul 2023 16:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyKD20J8Kz4N4H; Fri, 7 Jul 2023 16:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i97a8cocksl3Bx9s9LScNO5xg+p3uu58aZoIuf7DF0M=; b=CnSNyhaoBYakuAYfce1FkEPrA3k5BE9rn69SkN2OufAshQVva4k4dltwYTnAAo4hTvkWYc LgLJD/sJi3TNmLLb4wMiS2kbPRV1h4jmdOGzw0IzZ857v6+qAJYKSIa3gv1cT6zO2BN+/a uRjG7FWcAjQMElDqWPFmvTVHOXE35NBZSAjzo3ukJpY2EC3k/Za+hts771Uu/q9wfkX2Ll xHqGR7bLugI/UnLKrHAmLH6mQ6049kpyKZuF0yp1Lu3oVdtlaxeLpcswefheNtCXPYhBy1 CVAd33CK2mhq517mgDK5eQo/szvmK7KCw/0XusZQfiEIkUPH5/oTWfvAPf4FNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i97a8cocksl3Bx9s9LScNO5xg+p3uu58aZoIuf7DF0M=; b=J9CXExIZpSHDdqil2tqU+c67YvabxViPPdmbgw5xBizZCEoXQmYCso7fl91acqtgff9Pig rJd35F6sjpuKARaGyl7iwmMfSvIyu9WrvG7yB/XZfD3bPd3d1jBGGBJUxkiOBZDTBYulmz 8d/7hlvcG3BgiQOrJGSxpnuY523vo0hzlQY+FmST/j0VbjjeOZ/n6ych5NxhQ8emzypL4A TZVOC0IXnJqIUiVOBPRphlg21gxrDgFLeK09Xjpr3jqXZ7SvglF4aYbt4enMQbRco/PHG6 ZAthMhSBvE5S3cg611ktV6/vq37sagQ8OaMhdFoILoaLFp1mB/iwS9yuDU16Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748674; a=rsa-sha256; cv=none; b=FYInXYNzPM6Lp27bOt3p6py0+ckq4uVTt+YGYBgu+D2odBw9vVZ9VABo3U3c+QpNi8wTp1 lyw93HQqCrsPiWOfRnhNXE1hyzaXuwfZqgvr2UEP2CO4mHqwxPtRrx3PcncSwWVZRK9Q6H fXFzXpfBA5b0hQph8G3l/Jo8Z4doBwtkcvc5U0amSrS9bcEqB9J5593v5OPi41O/g4qXFz 4isFGoSTPujuA5PPGSn+FJRwLV6BjGRm3CP1mu5IgUs1uO1NZODlt2/6mpufencebGMDvu dKlxzESg0WgHSHJRcAbt1ml4bxvQlIbi8wlaPymK3aXO/+kBQSPcZqNaNSBrxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKD163G0zmG1; Fri, 7 Jul 2023 16:51:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367GpDdx010739; Fri, 7 Jul 2023 16:51:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GpDFP010738; Fri, 7 Jul 2023 16:51:13 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:13 GMT Message-Id: <202307071651.367GpDFP010738@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: cccdaf507eee - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cccdaf507eee8fb34494b4624eb85bb951e323c8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cccdaf507eee8fb34494b4624eb85bb951e323c8 commit cccdaf507eee8fb34494b4624eb85bb951e323c8 Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh 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/script/script.c | 2 +- usr.bin/sed/main.c | 2 +- usr.bin/showmount/showmount.c | 2 +- usr.bin/split/split.c | 2 +- usr.bin/tail/tail.c | 2 +- usr.bin/tee/tee.c | 2 +- usr.bin/time/time.c | 2 +- usr.bin/tr/tr.c | 2 +- usr.bin/tty/tty.c | 2 +- usr.bin/ul/ul.c | 2 +- usr.bin/uname/uname.c | 2 +- usr.bin/unexpand/unexpand.c | 2 +- usr.bin/usbhidctl/usbhid.c | 2 +- usr.bin/wall/wall.c | 2 +- usr.bin/what/what.c | 2 +- usr.bin/whois/whois.c | 2 +- usr.bin/write/write.c | 2 +- usr.bin/xstr/xstr.c | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index 1d3588c26d8b..72e639e413dd 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -102,7 +102,7 @@ static void finish(void); static void record(FILE *, char *, size_t, int); static void consume(FILE *, off_t, char *, int); static void playback(FILE *) __dead2; -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 44a274eb90e6..4139b69da2f8 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -121,7 +121,7 @@ u_long linenum; static void add_compunit(enum e_cut, char *); static void add_file(char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index fbd1c9bbbe3c..d2b9f46792ba 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -97,7 +97,7 @@ static struct exportslist *exportslist; static int type = 0; void print_dump(struct mountlist *); -static void usage(void); +static void usage(void) __dead2; int xdr_mntdump(XDR *, struct mountlist **); int xdr_exportslist(XDR *, struct exportslist **); int tcp_callrpc(const char *host, int prognum, int versnum, int procnum, diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index 91710899a9e9..cee3980ea291 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -82,7 +82,7 @@ static void newfile(void); static void split1(void); static void split2(void); static void split3(void); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index e0266515d749..a9841f2d4a8a 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -70,7 +70,7 @@ int Fflag, fflag, qflag, rflag, rval, no_files, vflag; fileargs_t *fa; static void obsolete(char **); -static void usage(void); +static void usage(void) __dead2; static const struct option long_opts[] = { diff --git a/usr.bin/tee/tee.c b/usr.bin/tee/tee.c index bc338e14bd66..5646930a1c98 100644 --- a/usr.bin/tee/tee.c +++ b/usr.bin/tee/tee.c @@ -66,7 +66,7 @@ struct entry { static STAILQ_HEAD(, entry) head = STAILQ_HEAD_INITIALIZER(head); static void add(int, const char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 9121b1f14408..64063212170d 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -66,7 +66,7 @@ static void humantime(FILE *, long, long); static void showtime(FILE *, struct timespec *, struct timespec *, struct rusage *); static void siginfo(int); -static void usage(void); +static void usage(void) __dead2; static sig_atomic_t siginfo_recvd; static char decimal_point; diff --git a/usr.bin/tr/tr.c b/usr.bin/tr/tr.c index 2d1baad2ac09..32f1858049ac 100644 --- a/usr.bin/tr/tr.c +++ b/usr.bin/tr/tr.c @@ -67,7 +67,7 @@ static STR s1 = { STRING1, NORMAL, 0, OOBCH, 0, { 0, OOBCH }, NULL, NULL }; static STR s2 = { STRING2, NORMAL, 0, OOBCH, 0, { 0, OOBCH }, NULL, NULL }; static struct cset *setup(char *, STR *, int, int); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/usr.bin/tty/tty.c b/usr.bin/tty/tty.c index 02fc2fec1e28..4f9549eb67c5 100644 --- a/usr.bin/tty/tty.c +++ b/usr.bin/tty/tty.c @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/ul/ul.c b/usr.bin/ul/ul.c index 14b1d87905d2..07a796ffd55b 100644 --- a/usr.bin/ul/ul.c +++ b/usr.bin/ul/ul.c @@ -89,7 +89,7 @@ static int halfpos; static int upln; static int iflag; -static void usage(void); +static void usage(void) __dead2; static void setnewmode(int); static void initcap(void); static void reverse(void); diff --git a/usr.bin/uname/uname.c b/usr.bin/uname/uname.c index 109505e4b9da..980705e984f4 100644 --- a/usr.bin/uname/uname.c +++ b/usr.bin/uname/uname.c @@ -85,7 +85,7 @@ static void native_uservers(void); static void native_buildid(void); static void print_uname(u_int); static void setup_get(void); -static void usage(void); +static void usage(void) __dead2; static char *buildid, *ident, *platform, *hostname, *arch, *release, *sysname, *version, *kernvers, *uservers; diff --git a/usr.bin/unexpand/unexpand.c b/usr.bin/unexpand/unexpand.c index 08ba8ffe1dc4..47a3b1f611ca 100644 --- a/usr.bin/unexpand/unexpand.c +++ b/usr.bin/unexpand/unexpand.c @@ -62,7 +62,7 @@ static int nstops; static int tabstops[100]; static void getstops(const char *); -static void usage(void); +static void usage(void) __dead2; static int tabify(const char *); int diff --git a/usr.bin/usbhidctl/usbhid.c b/usr.bin/usbhidctl/usbhid.c index 984cdebc3289..b814aa3924d1 100644 --- a/usr.bin/usbhidctl/usbhid.c +++ b/usr.bin/usbhidctl/usbhid.c @@ -58,7 +58,7 @@ static int hexdump = 0; static int wflag = 0; static int zflag = 0; -static void usage(void); +static void usage(void) __dead2; static void dumpitem(const char *label, struct hid_item *h); static void dumpitems(report_desc_t r); static void prdata(u_char *buf, struct hid_item *h); diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c index a02f103cb80f..b1db354e6ec3 100644 --- a/usr.bin/wall/wall.c +++ b/usr.bin/wall/wall.c @@ -70,7 +70,7 @@ static const char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93"; #include "ttymsg.h" static void makemsg(char *); -static void usage(void); +static void usage(void) __dead2; static struct wallgroup { struct wallgroup *next; diff --git a/usr.bin/what/what.c b/usr.bin/what/what.c index 6d59f70cb589..5430a1fa0f35 100644 --- a/usr.bin/what/what.c +++ b/usr.bin/what/what.c @@ -49,7 +49,7 @@ static const char sccsid[] = "@(#)what.c 8.1 (Berkeley) 6/6/93"; #include #include -static void usage(void); +static void usage(void) __dead2; static bool search(bool, bool, FILE *); int diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index d98120052b76..5dccb3c4a485 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -159,7 +159,7 @@ static const char *port = DEFAULT_PORT; static const char *choose_server(char *); static struct addrinfo *gethostinfo(const char *, const char *, int); static void s_asprintf(char **ret, const char *format, ...) __printflike(2, 3); -static void usage(void); +static void usage(void) __dead2; static void whois(const char *, const char *, const char *, int); int diff --git a/usr.bin/write/write.c b/usr.bin/write/write.c index 06cae97d9fc9..399373c5bc57 100644 --- a/usr.bin/write/write.c +++ b/usr.bin/write/write.c @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); void done(int); void do_write(int, char *, char *, const char *); -static void usage(void); +static void usage(void) __dead2; int term_chk(int, char *, int *, time_t *, int); void wr_fputs(wchar_t *s); void search_utmp(int, char *, char *, char *, uid_t); diff --git a/usr.bin/xstr/xstr.c b/usr.bin/xstr/xstr.c index da96581c3f2b..af9f0d2893bb 100644 --- a/usr.bin/xstr/xstr.c +++ b/usr.bin/xstr/xstr.c @@ -84,7 +84,7 @@ static int xgetc(FILE *); static off_t hashit(char *, int); static off_t yankstr(char **); -static void usage(void); +static void usage(void) __dead2; static void flushsh(void); static void found(int, off_t, char *);