Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin Use __dead
details: https://anonhg.NetBSD.org/src/rev/72a7f1f0b101
branches: trunk
changeset: 768968:72a7f1f0b101
user: joerg <joerg%NetBSD.org@localhost>
date: Mon Aug 29 14:51:17 2011 +0000
description:
Use __dead
diffstat:
bin/chio/chio.c | 6 +++---
bin/chmod/chmod.c | 9 ++++-----
bin/csh/csh.c | 6 +++---
bin/csh/dol.c | 6 +++---
bin/csh/extern.h | 10 +++++-----
bin/csh/sem.c | 6 +++---
bin/dd/extern.h | 4 ++--
bin/domainname/domainname.c | 7 +++----
bin/ed/ed.h | 8 ++++----
bin/hostname/hostname.c | 9 ++++-----
bin/kill/kill.c | 10 +++++-----
bin/ps/ps.c | 6 +++---
bin/pwd/pwd.c | 6 +++---
bin/sleep/sleep.c | 14 ++++++--------
bin/stty/extern.h | 4 ++--
bin/stty/gfmt.c | 6 +++---
bin/test/test.c | 6 +++---
17 files changed, 59 insertions(+), 64 deletions(-)
diffs (truncated from 509 to 300 lines):
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/chio/chio.c
--- a/bin/chio/chio.c Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/chio/chio.c Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chio.c,v 1.30 2008/07/20 00:52:39 lukem Exp $ */
+/* $NetBSD: chio.c,v 1.31 2011/08/29 14:51:17 joerg Exp $ */
/*-
* Copyright (c) 1996, 1998, 1999 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
__COPYRIGHT(
"@(#) Copyright (c) 1996, 1998, 1999\
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: chio.c,v 1.30 2008/07/20 00:52:39 lukem Exp $");
+__RCSID("$NetBSD: chio.c,v 1.31 2011/08/29 14:51:17 joerg Exp $");
#endif
#include <sys/param.h>
@@ -61,7 +61,7 @@
#include "pathnames.h"
int main(int, char *[]);
-static void usage(void);
+__dead static void usage(void);
static void cleanup(void);
static int parse_element_type(const char *);
static int parse_element_unit(const char *);
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/chmod/chmod.c
--- a/bin/chmod/chmod.c Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/chmod/chmod.c Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chmod.c,v 1.35 2010/01/22 05:41:36 snj Exp $ */
+/* $NetBSD: chmod.c,v 1.36 2011/08/29 14:51:17 joerg Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94";
#else
-__RCSID("$NetBSD: chmod.c,v 1.35 2010/01/22 05:41:36 snj Exp $");
+__RCSID("$NetBSD: chmod.c,v 1.36 2011/08/29 14:51:17 joerg Exp $");
#endif
#endif /* not lint */
@@ -58,8 +58,7 @@
#include <string.h>
#include <unistd.h>
-int main(int, char *[]);
-void usage(void);
+__dead static void usage(void);
int
main(int argc, char *argv[])
@@ -203,7 +202,7 @@
/* NOTREACHED */
}
-void
+static void
usage(void)
{
(void)fprintf(stderr,
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/csh/csh.c
--- a/bin/csh/csh.c Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/csh/csh.c Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: csh.c,v 1.41 2008/07/20 00:52:39 lukem Exp $ */
+/* $NetBSD: csh.c,v 1.42 2011/08/29 14:51:17 joerg Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)csh.c 8.2 (Berkeley) 10/12/93";
#else
-__RCSID("$NetBSD: csh.c,v 1.41 2008/07/20 00:52:39 lukem Exp $");
+__RCSID("$NetBSD: csh.c,v 1.42 2011/08/29 14:51:17 joerg Exp $");
#endif
#endif /* not lint */
@@ -99,7 +99,7 @@
static int closef(void *);
static int srccat(Char *, Char *);
static int srcfile(const char *, int, int);
-static void phup(int);
+__dead static void phup(int);
static void srcunit(int, int, int);
static void mailchk(void);
#ifndef _PATH_DEFPATH
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/csh/dol.c
--- a/bin/csh/dol.c Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/csh/dol.c Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dol.c,v 1.26 2007/07/16 18:26:09 christos Exp $ */
+/* $NetBSD: dol.c,v 1.27 2011/08/29 14:51:17 joerg Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dol.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dol.c,v 1.26 2007/07/16 18:26:09 christos Exp $");
+__RCSID("$NetBSD: dol.c,v 1.27 2011/08/29 14:51:17 joerg Exp $");
#endif
#endif /* not lint */
@@ -85,7 +85,7 @@
static void Dfix2(Char **);
static Char *Dpack(Char *, Char *);
static int Dword(void);
-static void dolerror(Char *);
+__dead static void dolerror(Char *);
static int DgetC(int);
static void Dgetdol(void);
static void fixDolMod(void);
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/csh/extern.h
--- a/bin/csh/extern.h Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/csh/extern.h Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.22 2007/12/24 16:11:50 perry Exp $ */
+/* $NetBSD: extern.h,v 1.23 2011/08/29 14:51:17 joerg Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -42,10 +42,10 @@
int gethdir(Char *);
void dosource(Char **, struct command *);
__dead void exitstat(void);
-void goodbye(void);
+__dead void goodbye(void);
void importpath(Char *);
void initdesc(void);
-void pintr(int);
+__dead void pintr(int);
__dead void pintr1(int);
void printprompt(void);
void process(int);
@@ -128,8 +128,8 @@
void dogoto(Char **, struct command *);
void doif(Char **, struct command *);
void dolimit(Char **, struct command *);
-void dologin(Char **, struct command *);
-void dologout(Char **, struct command *);
+__dead void dologin(Char **, struct command *);
+__dead void dologout(Char **, struct command *);
void donohup(Char **, struct command *);
void doonintr(Char **, struct command *);
void doprintf(Char **, struct command *);
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/csh/sem.c
--- a/bin/csh/sem.c Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/csh/sem.c Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sem.c,v 1.28 2007/07/16 18:26:10 christos Exp $ */
+/* $NetBSD: sem.c,v 1.29 2011/08/29 14:51:17 joerg Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)sem.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: sem.c,v 1.28 2007/07/16 18:26:10 christos Exp $");
+__RCSID("$NetBSD: sem.c,v 1.29 2011/08/29 14:51:17 joerg Exp $");
#endif
#endif /* not lint */
@@ -53,7 +53,7 @@
#include "extern.h"
#include "proc.h"
-static void vffree(int);
+__dead static void vffree(int);
static Char *splicepipe(struct command *t, Char *);
static void doio(struct command *t, int *, int *);
static void chkclob(char *);
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/dd/extern.h
--- a/bin/dd/extern.h Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/dd/extern.h Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.18 2010/11/22 21:04:28 pooka Exp $ */
+/* $NetBSD: extern.h,v 1.19 2011/08/29 14:51:18 joerg Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -47,7 +47,7 @@
void pos_out(void);
void summary(void);
void summaryx(int);
-void terminate(int);
+__dead void terminate(int);
void unblock(void);
void unblock_close(void);
ssize_t bwrite(IO *, const void *, size_t);
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/domainname/domainname.c
--- a/bin/domainname/domainname.c Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/domainname/domainname.c Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: domainname.c,v 1.14 2008/07/20 00:52:39 lukem Exp $ */
+/* $NetBSD: domainname.c,v 1.15 2011/08/29 14:51:18 joerg Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)hostname.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: domainname.c,v 1.14 2008/07/20 00:52:39 lukem Exp $");
+__RCSID("$NetBSD: domainname.c,v 1.15 2011/08/29 14:51:18 joerg Exp $");
#endif
#endif /* not lint */
@@ -51,8 +51,7 @@
#include <string.h>
#include <unistd.h>
-static void usage(void);
-int main(int, char *[]);
+__dead static void usage(void);
int
main(int argc, char *argv[])
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/ed/ed.h
--- a/bin/ed/ed.h Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/ed/ed.h Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ed.h,v 1.34 2009/07/26 02:06:37 dholland Exp $ */
+/* $NetBSD: ed.h,v 1.35 2011/08/29 14:51:18 joerg Exp $ */
/* ed.h: type and constant definitions for the ed editor. */
/*
@@ -223,8 +223,8 @@
int get_shell_command(void);
int get_stream_line(FILE *);
int get_tty_line(void);
-void handle_hup(int);
-void handle_int(int);
+__dead void handle_hup(int);
+__dead void handle_int(int);
void handle_winch(int);
int has_trailing_escape(char *, char *);
void init_buffers(void);
@@ -243,7 +243,7 @@
char *put_sbuf_line(char *);
int put_stream_line(FILE *, char *, int);
int put_tty_line(char *, int, long, int);
-void quit(int);
+__dead void quit(int);
long read_file(char *, long);
long read_stream(FILE *, long);
int search_and_replace(pattern_t *, int, int);
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/hostname/hostname.c
--- a/bin/hostname/hostname.c Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/hostname/hostname.c Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hostname.c,v 1.16 2008/07/20 00:52:39 lukem Exp $ */
+/* $NetBSD: hostname.c,v 1.17 2011/08/29 14:51:18 joerg Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)hostname.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: hostname.c,v 1.16 2008/07/20 00:52:39 lukem Exp $");
+__RCSID("$NetBSD: hostname.c,v 1.17 2011/08/29 14:51:18 joerg Exp $");
#endif
#endif /* not lint */
@@ -51,8 +51,7 @@
#include <string.h>
#include <unistd.h>
-void usage(void);
-int main(int, char *[]);
+__dead static void usage(void);
int
main(int argc, char *argv[])
@@ -92,7 +91,7 @@
/* NOTREACHED */
}
-void
+static void
usage(void)
{
(void)fprintf(stderr, "usage: %s [-s] [name-of-host]\n",
diff -r 9fa8d54d042f -r 72a7f1f0b101 bin/kill/kill.c
--- a/bin/kill/kill.c Mon Aug 29 14:50:27 2011 +0000
+++ b/bin/kill/kill.c Mon Aug 29 14:51:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kill.c,v 1.26 2009/10/01 09:24:38 spz Exp $ */
+/* $NetBSD: kill.c,v 1.27 2011/08/29 14:51:18 joerg Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@@ -39,7 +39,7 @@
Home |
Main Index |
Thread Index |
Old Index