Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jul 2023 16:51:02 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 69c0fb2a7a6f - main - Mark usage function as __dead2 in programs where it does not return
Message-ID:  <202307071651.367Gp2c8010520@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=69c0fb2a7a6f8145102f3ef370410fc380735e1c

commit 69c0fb2a7a6f8145102f3ef370410fc380735e1c
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:17 +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
---
 libexec/atrun/atrun.c                  | 2 +-
 libexec/bootpd/bootpgw/bootpgw.c       | 2 +-
 libexec/bootpd/tools/bootpef/bootpef.c | 2 +-
 libexec/rbootd/rbootd.c                | 2 +-
 libexec/rpc.rwalld/rwalld.c            | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c
index 78d4ab32157b..e9e49146ba7a 100644
--- a/libexec/atrun/atrun.c
+++ b/libexec/atrun/atrun.c
@@ -96,7 +96,7 @@ static int debug = 0;
 
 void perr(const char *fmt, ...);
 void perrx(const char *fmt, ...);
-static void usage(void);
+static void usage(void) __dead2;
 
 /* Local functions */
 static int
diff --git a/libexec/bootpd/bootpgw/bootpgw.c b/libexec/bootpd/bootpgw/bootpgw.c
index c0042ccb1de3..1aab5e7f6f50 100644
--- a/libexec/bootpd/bootpgw/bootpgw.c
+++ b/libexec/bootpd/bootpgw/bootpgw.c
@@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$");
  * Externals, forward declarations, and global variables
  */
 
-static void usage(void);
+static void usage(void) __dead2;
 static void handle_reply(void);
 static void handle_request(void);
 
diff --git a/libexec/bootpd/tools/bootpef/bootpef.c b/libexec/bootpd/tools/bootpef/bootpef.c
index 2fb928f3065d..51e5e581f7d7 100644
--- a/libexec/bootpd/tools/bootpef/bootpef.c
+++ b/libexec/bootpd/tools/bootpef/bootpef.c
@@ -78,7 +78,7 @@ SOFTWARE.
  */
 
 static void mktagfile(struct host *);
-static void usage(void);
+static void usage(void) __dead2;
 
 /*
  * General
diff --git a/libexec/rbootd/rbootd.c b/libexec/rbootd/rbootd.c
index 9e1c8e0bda76..6afceae050ab 100644
--- a/libexec/rbootd/rbootd.c
+++ b/libexec/rbootd/rbootd.c
@@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$");
 #include <unistd.h>
 #include "defs.h"
 
-static void usage(void);
+static void usage(void) __dead2;
 
 int
 main(int argc, char *argv[])
diff --git a/libexec/rpc.rwalld/rwalld.c b/libexec/rpc.rwalld/rwalld.c
index adde226cfba8..d1167219bd26 100644
--- a/libexec/rpc.rwalld/rwalld.c
+++ b/libexec/rpc.rwalld/rwalld.c
@@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
 void wallprog_1(struct svc_req *rqstp, SVCXPRT *transp);
 void possess(void);
 void killkids(int sig);
-static void usage(void);
+static void usage(void) __dead2;
 
 int nodaemon = 0;
 int from_inetd = 1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307071651.367Gp2c8010520>