Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Use __dead
details: https://anonhg.NetBSD.org/src/rev/17a123c3f365
branches: trunk
changeset: 768987:17a123c3f365
user: joerg <joerg%NetBSD.org@localhost>
date: Mon Aug 29 20:41:06 2011 +0000
description:
Use __dead
diffstat:
dist/bzip2/bzip2recover.c | 10 +++++-----
lib/libpuffs/puffs.h | 4 ++--
libexec/ftpd/extern.h | 6 +++---
libexec/ftpd/ftpd.c | 10 +++++-----
libexec/getNAME/getNAME.c | 6 +++---
libexec/identd/identd.c | 10 +++++-----
libexec/rpc.rstatd/rstatd.c | 9 ++++-----
libexec/rpc.rwalld/rwalld.c | 8 +++-----
libexec/rpc.sprayd/sprayd.c | 10 ++++------
libexec/tftpd/tftpd.c | 12 ++++++------
sys/rump/include/rump/rumpuser.h | 4 ++--
11 files changed, 42 insertions(+), 47 deletions(-)
diffs (truncated from 322 to 300 lines):
diff -r 6a6771b89c5d -r 17a123c3f365 dist/bzip2/bzip2recover.c
--- a/dist/bzip2/bzip2recover.c Mon Aug 29 20:38:53 2011 +0000
+++ b/dist/bzip2/bzip2recover.c Mon Aug 29 20:41:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bzip2recover.c,v 1.8 2011/05/24 12:18:03 joerg Exp $ */
+/* $NetBSD: bzip2recover.c,v 1.9 2011/08/29 20:41:22 joerg Exp $ */
/*-----------------------------------------------------------*/
@@ -112,7 +112,7 @@
/*---------------------------------------------------*/
/*---------------------------------------------*/
-static void readError ( void )
+__dead static void readError ( void )
{
fprintf ( stderr,
"%s: I/O error reading `%s', possible reason follows.\n",
@@ -125,7 +125,7 @@
/*---------------------------------------------*/
-static void writeError ( void )
+__dead static void writeError ( void )
{
fprintf ( stderr,
"%s: I/O error reading `%s', possible reason follows.\n",
@@ -138,7 +138,7 @@
/*---------------------------------------------*/
-static void mallocFail ( Int32 n )
+__dead static void mallocFail ( Int32 n )
{
fprintf ( stderr,
"%s: malloc failed on request for %d bytes.\n",
@@ -150,7 +150,7 @@
/*---------------------------------------------*/
-static void tooManyBlocks ( Int32 max_handled_blocks )
+__dead static void tooManyBlocks ( Int32 max_handled_blocks )
{
fprintf ( stderr,
"%s: `%s' appears to contain more than %d blocks\n",
diff -r 6a6771b89c5d -r 17a123c3f365 lib/libpuffs/puffs.h
--- a/lib/libpuffs/puffs.h Mon Aug 29 20:38:53 2011 +0000
+++ b/lib/libpuffs/puffs.h Mon Aug 29 20:41:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs.h,v 1.118 2011/07/04 08:07:30 manu Exp $ */
+/* $NetBSD: puffs.h,v 1.119 2011/08/29 20:48:36 joerg Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -615,7 +615,7 @@
void puffs_set_errnotify(struct puffs_usermount *, pu_errnotify_fn);
void puffs_kernerr_log(struct puffs_usermount *, uint8_t, int,
const char *, puffs_cookie_t);
-void puffs_kernerr_abort(struct puffs_usermount *, uint8_t, int,
+__dead void puffs_kernerr_abort(struct puffs_usermount *, uint8_t, int,
const char *, puffs_cookie_t);
void puffs_set_prepost(struct puffs_usermount *,
pu_prepost_fn, pu_prepost_fn);
diff -r 6a6771b89c5d -r 17a123c3f365 libexec/ftpd/extern.h
--- a/libexec/ftpd/extern.h Mon Aug 29 20:38:53 2011 +0000
+++ b/libexec/ftpd/extern.h Mon Aug 29 20:41:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.61 2009/07/13 19:05:40 roy Exp $ */
+/* $NetBSD: extern.h,v 1.62 2011/08/29 20:41:06 joerg Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -124,8 +124,8 @@
void delete(const char *);
int display_file(const char *, int);
const char **do_conversion(const char *);
-void dologout(int);
-void fatal(const char *);
+__dead void dologout(int);
+__dead void fatal(const char *);
void feat(void);
void format_path(char *, const char *);
int ftpd_pclose(FILE *);
diff -r 6a6771b89c5d -r 17a123c3f365 libexec/ftpd/ftpd.c
--- a/libexec/ftpd/ftpd.c Mon Aug 29 20:38:53 2011 +0000
+++ b/libexec/ftpd/ftpd.c Mon Aug 29 20:41:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpd.c,v 1.194 2009/07/13 19:05:40 roy Exp $ */
+/* $NetBSD: ftpd.c,v 1.195 2011/08/29 20:41:06 joerg Exp $ */
/*
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
#if 0
static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: ftpd.c,v 1.194 2009/07/13 19:05:40 roy Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.195 2011/08/29 20:41:06 joerg Exp $");
#endif
#endif /* not lint */
@@ -249,9 +249,9 @@
static void login_utmp(const char *, const char *, const char *,
struct sockinet *);
static void logremotehost(struct sockinet *);
-static void lostconn(int);
-static void toolong(int);
-static void sigquit(int);
+__dead static void lostconn(int);
+__dead static void toolong(int);
+__dead static void sigquit(int);
static void sigurg(int);
static int handleoobcmd(void);
static int receive_data(FILE *, FILE *);
diff -r 6a6771b89c5d -r 17a123c3f365 libexec/getNAME/getNAME.c
--- a/libexec/getNAME/getNAME.c Mon Aug 29 20:38:53 2011 +0000
+++ b/libexec/getNAME/getNAME.c Mon Aug 29 20:41:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getNAME.c,v 1.26 2008/07/20 01:09:07 lukem Exp $ */
+/* $NetBSD: getNAME.c,v 1.27 2011/08/29 20:41:06 joerg Exp $ */
/*-
* Copyright (c) 1997, Christos Zoulas. All rights reserved.
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)getNAME.c 8.1 (Berkeley) 6/30/93";
#else
-__RCSID("$NetBSD: getNAME.c,v 1.26 2008/07/20 01:09:07 lukem Exp $");
+__RCSID("$NetBSD: getNAME.c,v 1.27 2011/08/29 20:41:06 joerg Exp $");
#endif
#endif /* not lint */
@@ -76,7 +76,7 @@
static void remquote(char *, size_t *);
static void fixxref(char *, size_t *);
static void split(char *, char *);
-static void usage(void);
+__dead static void usage(void);
int main(int, char *[]);
diff -r 6a6771b89c5d -r 17a123c3f365 libexec/identd/identd.c
--- a/libexec/identd/identd.c Mon Aug 29 20:38:53 2011 +0000
+++ b/libexec/identd/identd.c Mon Aug 29 20:41:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: identd.c,v 1.32 2009/01/18 00:37:53 lukem Exp $ */
+/* $NetBSD: identd.c,v 1.33 2011/08/29 20:41:06 joerg Exp $ */
/*
* identd.c - TCP/IP Ident protocol server.
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: identd.c,v 1.32 2009/01/18 00:37:53 lukem Exp $");
+__RCSID("$NetBSD: identd.c,v 1.33 2011/08/29 20:41:06 joerg Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -61,9 +61,9 @@
static int check_userident(const char *, char *, size_t);
static void random_string(char *, size_t);
static int change_format(const char *, struct passwd *, char *, size_t);
-static void timeout_handler(int);
-static void fatal(const char *);
-static void die(const char *, ...);
+__dead static void timeout_handler(int);
+__dead static void fatal(const char *);
+__dead static void die(const char *, ...);
static int bflag, eflag, fflag, iflag, Iflag;
static int lflag, Lflag, nflag, Nflag, rflag;
diff -r 6a6771b89c5d -r 17a123c3f365 libexec/rpc.rstatd/rstatd.c
--- a/libexec/rpc.rstatd/rstatd.c Mon Aug 29 20:38:53 2011 +0000
+++ b/libexec/rpc.rstatd/rstatd.c Mon Aug 29 20:41:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rstatd.c,v 1.14 2006/05/09 20:18:07 mrg Exp $ */
+/* $NetBSD: rstatd.c,v 1.15 2011/08/29 20:41:06 joerg Exp $ */
/*-
* Copyright (c) 1993, John Brezak
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rstatd.c,v 1.14 2006/05/09 20:18:07 mrg Exp $");
+__RCSID("$NetBSD: rstatd.c,v 1.15 2011/08/29 20:41:06 joerg Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -50,13 +50,12 @@
#include <rpcsvc/rstat.h>
extern void rstat_service(struct svc_req *, SVCXPRT *);
-void cleanup(int);
-int main(int, char *[]);
+__dead static void cleanup(int);
int from_inetd = 1; /* started from inetd ? */
int closedown = 20; /* how long to wait before going dormant */
-void
+static void
cleanup(int dummy)
{
(void) rpcb_unset(RSTATPROG, RSTATVERS_TIME, NULL);
diff -r 6a6771b89c5d -r 17a123c3f365 libexec/rpc.rwalld/rwalld.c
--- a/libexec/rpc.rwalld/rwalld.c Mon Aug 29 20:38:53 2011 +0000
+++ b/libexec/rpc.rwalld/rwalld.c Mon Aug 29 20:41:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rwalld.c,v 1.20 2006/05/09 20:18:07 mrg Exp $ */
+/* $NetBSD: rwalld.c,v 1.21 2011/08/29 20:41:06 joerg Exp $ */
/*
* Copyright (c) 1993 Christopher G. Demetriou
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rwalld.c,v 1.20 2006/05/09 20:18:07 mrg Exp $");
+__RCSID("$NetBSD: rwalld.c,v 1.21 2011/08/29 20:41:06 joerg Exp $");
#endif /* not lint */
#include <unistd.h>
@@ -64,9 +64,7 @@
static void cleanup(int);
static void wallprog_1(struct svc_req *, SVCXPRT *);
-int main(int, char *[]);
-
-static void
+__dead static void
cleanup(int n)
{
diff -r 6a6771b89c5d -r 17a123c3f365 libexec/rpc.sprayd/sprayd.c
--- a/libexec/rpc.sprayd/sprayd.c Mon Aug 29 20:38:53 2011 +0000
+++ b/libexec/rpc.sprayd/sprayd.c Mon Aug 29 20:41:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sprayd.c,v 1.15 2009/10/21 01:07:46 snj Exp $ */
+/* $NetBSD: sprayd.c,v 1.16 2011/08/29 20:41:06 joerg Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: sprayd.c,v 1.15 2009/10/21 01:07:46 snj Exp $");
+__RCSID("$NetBSD: sprayd.c,v 1.16 2011/08/29 20:41:06 joerg Exp $");
#endif /* not lint */
#include <stdio.h>
@@ -40,12 +40,10 @@
#include <rpc/rpc.h>
#include <rpcsvc/spray.h>
-static void cleanup(int);
-static void die(int);
+__dead static void cleanup(int);
+__dead static void die(int);
static void spray_service(struct svc_req *, SVCXPRT *);
-int main(int, char *[]);
-
static int from_inetd = 1;
#define TIMEOUT 120
diff -r 6a6771b89c5d -r 17a123c3f365 libexec/tftpd/tftpd.c
--- a/libexec/tftpd/tftpd.c Mon Aug 29 20:38:53 2011 +0000
+++ b/libexec/tftpd/tftpd.c Mon Aug 29 20:41:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tftpd.c,v 1.38 2010/04/29 20:13:46 hubertf Exp $ */
+/* $NetBSD: tftpd.c,v 1.39 2011/08/29 20:41:07 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)tftpd.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: tftpd.c,v 1.38 2010/04/29 20:13:46 hubertf Exp $");
+__RCSID("$NetBSD: tftpd.c,v 1.39 2011/08/29 20:41:07 joerg Exp $");
#endif
#endif /* not lint */
@@ -115,13 +115,13 @@
static const char *errtomsg(int);
static void nak(int);
-static void tftp(struct tftphdr *, int);
-static void usage(void) __attribute__((__noreturn__));
+__dead static void tftp(struct tftphdr *, int);
+__dead static void usage(void);
static char *verifyhost(struct sockaddr *);
-static void justquit(int);
+__dead static void justquit(int);
static void recvfile(struct formats *, int, int);
static void sendfile(struct formats *, int, int);
-static void timer(int);
Home |
Main Index |
Thread Index |
Old Index