summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rcs/ci.c8
-rw-r--r--usr.bin/rcs/co.c9
-rw-r--r--usr.bin/rcs/ident.c7
-rw-r--r--usr.bin/rcs/merge.c8
-rw-r--r--usr.bin/rcs/rcsclean.c9
-rw-r--r--usr.bin/rcs/rcsdiff.c9
-rw-r--r--usr.bin/rcs/rcsmerge.c10
-rw-r--r--usr.bin/rcs/rcsprog.c9
-rw-r--r--usr.bin/rcs/rcsprog.h48
-rw-r--r--usr.bin/rcs/rlog.c8
10 files changed, 60 insertions, 65 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c
index 842316642fb..1ddaf3392d6 100644
--- a/usr.bin/rcs/ci.c
+++ b/usr.bin/rcs/ci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ci.c,v 1.217 2014/05/19 19:42:24 jca Exp $ */
+/* $OpenBSD: ci.c,v 1.218 2014/10/02 06:23:15 otto Exp $ */
/*
* Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org>
* All rights reserved.
@@ -89,7 +89,7 @@ static void checkin_parsekeyword(char *, RCSNUM **, time_t *, char **,
static int checkin_update(struct checkin_params *);
static int checkin_revert(struct checkin_params *);
-void
+__dead void
checkin_usage(void)
{
fprintf(stderr,
@@ -97,6 +97,8 @@ checkin_usage(void)
" [-j[rev]] [-k[rev]] [-l[rev]] [-M[rev]] [-mmsg]\n"
" [-Nsymbol] [-nsymbol] [-r[rev]] [-sstate] [-t[str]]\n"
" [-u[rev]] [-wusername] [-xsuffixes] [-ztz] file ...\n");
+
+ exit(1);
}
/*
@@ -221,7 +223,6 @@ checkin_main(int argc, char **argv)
break;
default:
(usage)();
- exit(1);
}
}
@@ -231,7 +232,6 @@ checkin_main(int argc, char **argv)
if (argc == 0) {
warnx("no input file");
(usage)();
- exit(1);
}
if ((pb.username = getlogin()) == NULL)
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c
index 37089b2e825..efee26fd43c 100644
--- a/usr.bin/rcs/co.c
+++ b/usr.bin/rcs/co.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: co.c,v 1.117 2013/04/16 20:24:45 deraadt Exp $ */
+/* $OpenBSD: co.c,v 1.118 2014/10/02 06:23:15 otto Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -79,7 +79,6 @@ checkout_main(int argc, char **argv)
if (RCS_KWEXP_INVAL(kflag)) {
warnx("invalid RCS keyword substitution mode");
(usage)();
- exit(1);
}
break;
case 'l':
@@ -141,7 +140,6 @@ checkout_main(int argc, char **argv)
break;
default:
(usage)();
- exit(1);
}
}
@@ -151,7 +149,6 @@ checkout_main(int argc, char **argv)
if (argc == 0) {
warnx("no input file");
(usage)();
- exit (1);
}
if ((username = getlogin()) == NULL)
@@ -222,13 +219,15 @@ checkout_main(int argc, char **argv)
return (ret);
}
-void
+__dead void
checkout_usage(void)
{
fprintf(stderr,
"usage: co [-TV] [-ddate] [-f[rev]] [-I[rev]] [-kmode] [-l[rev]]\n"
" [-M[rev]] [-p[rev]] [-q[rev]] [-r[rev]] [-sstate]\n"
" [-u[rev]] [-w[user]] [-xsuffixes] [-ztz] file ...\n");
+
+ exit(1);
}
/*
diff --git a/usr.bin/rcs/ident.c b/usr.bin/rcs/ident.c
index f1a7a979bd7..af8f0ac4e18 100644
--- a/usr.bin/rcs/ident.c
+++ b/usr.bin/rcs/ident.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ident.c,v 1.29 2011/04/20 19:34:16 nicm Exp $ */
+/* $OpenBSD: ident.c,v 1.30 2014/10/02 06:23:15 otto Exp $ */
/*
* Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -59,7 +59,6 @@ ident_main(int argc, char **argv)
exit(0);
default:
(usage)();
- exit(1);
}
}
@@ -161,8 +160,10 @@ out:
buf_free(bp);
}
-void
+__dead void
ident_usage(void)
{
fprintf(stderr, "usage: ident [-qV] [file ...]\n");
+
+ exit(1);
}
diff --git a/usr.bin/rcs/merge.c b/usr.bin/rcs/merge.c
index aa74f4a034e..fa2977a37f4 100644
--- a/usr.bin/rcs/merge.c
+++ b/usr.bin/rcs/merge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: merge.c,v 1.7 2010/07/23 21:46:05 ray Exp $ */
+/* $OpenBSD: merge.c,v 1.8 2014/10/02 06:23:15 otto Exp $ */
/*
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -77,7 +77,6 @@ merge_main(int argc, char **argv)
exit(0);
default:
(usage)();
- exit(D_ERROR);
}
}
argc -= optind;
@@ -86,7 +85,6 @@ merge_main(int argc, char **argv)
if (argc != 3) {
warnx("%s arguments", (argc < 3) ? "not enough" : "too many");
(usage)();
- exit(D_ERROR);
}
for (; labels < 3; labels++)
@@ -113,9 +111,11 @@ merge_main(int argc, char **argv)
return (status);
}
-void
+__dead void
merge_usage(void)
{
(void)fprintf(stderr,
"usage: merge [-EepqV] [-L label] file1 file2 file3\n");
+
+ exit(D_ERROR);
}
diff --git a/usr.bin/rcs/rcsclean.c b/usr.bin/rcs/rcsclean.c
index 80b7d2af75f..1241e756d21 100644
--- a/usr.bin/rcs/rcsclean.c
+++ b/usr.bin/rcs/rcsclean.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsclean.c,v 1.52 2010/07/28 09:07:11 ray Exp $ */
+/* $OpenBSD: rcsclean.c,v 1.53 2014/10/02 06:23:15 otto Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -60,7 +60,6 @@ rcsclean_main(int argc, char **argv)
if (RCS_KWEXP_INVAL(kflag)) {
warnx("invalid RCS keyword substitution mode");
(usage)();
- exit(1);
}
break;
case 'n':
@@ -90,7 +89,6 @@ rcsclean_main(int argc, char **argv)
break;
default:
(usage)();
- exit(1);
}
}
@@ -104,7 +102,6 @@ rcsclean_main(int argc, char **argv)
if ((dirp = opendir(".")) == NULL) {
warn("opendir");
(usage)();
- exit(1);
}
while ((dp = readdir(dirp)) != NULL) {
@@ -121,12 +118,14 @@ rcsclean_main(int argc, char **argv)
return (0);
}
-void
+__dead void
rcsclean_usage(void)
{
fprintf(stderr,
"usage: rcsclean [-TV] [-kmode] [-n[rev]] [-q[rev]] [-r[rev]]\n"
" [-u[rev]] [-xsuffixes] [-ztz] [file ...]\n");
+
+ exit(1);
}
static void
diff --git a/usr.bin/rcs/rcsdiff.c b/usr.bin/rcs/rcsdiff.c
index 31e3e68b221..0938eec2143 100644
--- a/usr.bin/rcs/rcsdiff.c
+++ b/usr.bin/rcs/rcsdiff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsdiff.c,v 1.79 2013/04/16 20:24:45 deraadt Exp $ */
+/* $OpenBSD: rcsdiff.c,v 1.80 2014/10/02 06:23:15 otto Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -117,7 +117,6 @@ rcsdiff_main(int argc, char **argv)
if (RCS_KWEXP_INVAL(kflag)) {
warnx("invalid RCS keyword substitution mode");
(usage)();
- exit(D_ERROR);
}
break;
case 'n':
@@ -184,7 +183,6 @@ rcsdiff_main(int argc, char **argv)
break;
default:
(usage)();
- exit(D_ERROR);
}
}
@@ -194,7 +192,6 @@ rcsdiff_main(int argc, char **argv)
if (argc == 0) {
warnx("no input file");
(usage)();
- exit(D_ERROR);
}
if (diff_ignore_pats != NULL) {
@@ -267,12 +264,14 @@ rcsdiff_main(int argc, char **argv)
return (status);
}
-void
+__dead void
rcsdiff_usage(void)
{
fprintf(stderr,
"usage: rcsdiff [-cnquV] [-kmode] [-rrev] [-xsuffixes] [-ztz]\n"
" [diff_options] file ...\n");
+
+ exit(D_ERROR);
}
static int
diff --git a/usr.bin/rcs/rcsmerge.c b/usr.bin/rcs/rcsmerge.c
index 280e351557a..9ea825f5fa7 100644
--- a/usr.bin/rcs/rcsmerge.c
+++ b/usr.bin/rcs/rcsmerge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsmerge.c,v 1.52 2010/07/23 21:46:05 ray Exp $ */
+/* $OpenBSD: rcsmerge.c,v 1.53 2014/10/02 06:23:15 otto Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -68,7 +68,6 @@ rcsmerge_main(int argc, char **argv)
if (RCS_KWEXP_INVAL(kflag)) {
warnx("invalid RCS keyword substitution mode");
(usage)();
- exit(D_ERROR);
}
break;
case 'p':
@@ -100,7 +99,6 @@ rcsmerge_main(int argc, char **argv)
break;
default:
(usage)();
- exit(D_ERROR);
}
}
@@ -110,13 +108,11 @@ rcsmerge_main(int argc, char **argv)
if (rev_str1 == NULL) {
warnx("no base revision number given");
(usage)();
- exit(D_ERROR);
}
if (argc < 1) {
warnx("no input file");
(usage)();
- exit(D_ERROR);
}
if (argc > 2 || (argc == 2 && argv[1] != NULL))
@@ -187,10 +183,12 @@ out:
return (status);
}
-void
+__dead void
rcsmerge_usage(void)
{
fprintf(stderr,
"usage: rcsmerge [-EV] [-kmode] [-p[rev]] [-q[rev]]\n"
" [-xsuffixes] [-ztz] -rrev file ...\n");
+
+ exit(D_ERROR);
}
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index bb1af6f0228..31d7f92e476 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.151 2011/07/12 21:00:32 sobrado Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.152 2014/10/02 06:23:15 otto Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -158,13 +158,15 @@ main(int argc, char **argv)
}
-void
+__dead void
rcs_usage(void)
{
fprintf(stderr,
"usage: rcs [-IiLqTUV] [-Aoldfile] [-ausers] [-b[rev]]\n"
" [-cstring] [-e[users]] [-kmode] [-l[rev]] [-mrev:msg]\n"
" [-orev] [-t[str]] [-u[rev]] [-xsuffixes] file ...\n");
+
+ exit(1);
}
/*
@@ -225,7 +227,6 @@ rcs_main(int argc, char **argv)
if (RCS_KWEXP_INVAL(kflag)) {
warnx("invalid RCS keyword substitution mode");
(usage)();
- exit(1);
}
break;
case 'L':
@@ -290,7 +291,6 @@ rcs_main(int argc, char **argv)
break;
default:
(usage)();
- exit(1);
}
}
@@ -300,7 +300,6 @@ rcs_main(int argc, char **argv)
if (argc == 0) {
warnx("no input file");
(usage)();
- exit(1);
}
for (i = 0; i < argc; i++) {
diff --git a/usr.bin/rcs/rcsprog.h b/usr.bin/rcs/rcsprog.h
index 66db98cda81..9cb44c5ab5b 100644
--- a/usr.bin/rcs/rcsprog.h
+++ b/usr.bin/rcs/rcsprog.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.h,v 1.63 2010/07/23 21:46:05 ray Exp $ */
+/* $OpenBSD: rcsprog.h,v 1.64 2014/10/02 06:23:15 otto Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -86,44 +86,44 @@ extern struct wklhead temp_files;
time_t date_parse(const char *);
/* ci.c */
-int checkin_main(int, char **);
-void checkin_usage(void);
+int checkin_main(int, char **);
+__dead void checkin_usage(void);
/* co.c */
-int checkout_main(int, char **);
-int checkout_rev(RCSFILE *, RCSNUM *, const char *, int, const char *,
- const char *, const char *, const char *);
-void checkout_usage(void);
+int checkout_main(int, char **);
+int checkout_rev(RCSFILE *, RCSNUM *, const char *,
+ int, const char *, const char *, const char *, const char *);
+__dead void checkout_usage(void);
/* ident.c */
-int ident_main(int, char **);
-void ident_usage(void);
+int ident_main(int, char **);
+__dead void ident_usage(void);
/* merge.c */
-int merge_main(int, char **);
-void merge_usage(void);
+int merge_main(int, char **);
+__dead void merge_usage(void);
/* rcsclean.c */
-int rcsclean_main(int, char **);
-void rcsclean_usage(void);
+int rcsclean_main(int, char **);
+__dead void rcsclean_usage(void);
/* rcsdiff.c */
-int rcsdiff_main(int, char **);
-void rcsdiff_usage(void);
+int rcsdiff_main(int, char **);
+__dead void rcsdiff_usage(void);
/* rcsmerge.c */
-int rcsmerge_main(int, char **);
-void rcsmerge_usage(void);
+int rcsmerge_main(int, char **);
+__dead void rcsmerge_usage(void);
/* rcsprog.c */
-int build_cmd(char ***, char **, int);
-int rcs_getopt(int, char **, const char *);
-int rcs_main(int, char **);
-void rcs_usage(void);
-void (*usage)(void);
+int build_cmd(char ***, char **, int);
+int rcs_getopt(int, char **, const char *);
+int rcs_main(int, char **);
+__dead void rcs_usage(void);
+void (*usage)(void);
/* rlog.c */
-int rlog_main(int, char **);
-void rlog_usage(void);
+int rlog_main(int, char **);
+__dead void rlog_usage(void);
#endif /* RCSPROG_H */
diff --git a/usr.bin/rcs/rlog.c b/usr.bin/rcs/rlog.c
index ff66dc8ed71..0cb09d3a118 100644
--- a/usr.bin/rcs/rlog.c
+++ b/usr.bin/rcs/rlog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlog.c,v 1.67 2014/01/07 14:08:16 deraadt Exp $ */
+/* $OpenBSD: rlog.c,v 1.68 2014/10/02 06:23:15 otto Exp $ */
/*
* Copyright (c) 2005, 2009 Joris Vink <joris@openbsd.org>
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -58,13 +58,15 @@ static char *wlist = NULL;
static char *revisions = NULL;
static char *rlog_dates = NULL;
-void
+__dead void
rlog_usage(void)
{
fprintf(stderr,
"usage: rlog [-bhLNRtV] [-ddates] [-l[lockers]] [-r[revs]]\n"
" [-sstates] [-w[logins]] [-xsuffixes]\n"
" [-ztz] file ...\n");
+
+ exit(1);
}
int
@@ -135,7 +137,6 @@ rlog_main(int argc, char **argv)
break;
default:
(usage());
- exit(1);
}
}
@@ -145,7 +146,6 @@ rlog_main(int argc, char **argv)
if (argc == 0) {
warnx("no input file");
(usage)();
- exit(1);
}
if (hflag == 1 && tflag == 1) {