diff options
| author | jsm <jsm@NetBSD.org> | 2004-02-08 22:23:50 +0000 |
|---|---|---|
| committer | jsm <jsm@NetBSD.org> | 2004-02-08 22:23:50 +0000 |
| commit | c236eb893173d7076ff941420640c9129eb83ce1 (patch) | |
| tree | 445bd2d2533915f8055805a94c2274f6174619f5 | |
| parent | ad21fb31560f9565323f89d2a1468cff25268ae6 (diff) | |
| download | bsdgames-darwin-c236eb893173d7076ff941420640c9129eb83ce1.tar.gz bsdgames-darwin-c236eb893173d7076ff941420640c9129eb83ce1.zip | |
Mark unused parameters, nonreturning functions and format functions in
the few cases not already marked.
| -rw-r--r-- | backgammon/backgammon/main.c | 6 | ||||
| -rw-r--r-- | backgammon/teachgammon/teach.c | 6 | ||||
| -rw-r--r-- | cribbage/cribbage.h | 8 | ||||
| -rw-r--r-- | dm/dm.c | 6 | ||||
| -rw-r--r-- | fortune/unstr/unstr.c | 6 | ||||
| -rw-r--r-- | hunt/hunt/hunt.c | 12 | ||||
| -rw-r--r-- | hunt/hunt/otto.c | 6 | ||||
| -rw-r--r-- | hunt/huntd/faketalk.c | 6 | ||||
| -rw-r--r-- | hunt/huntd/hunt.h | 12 |
9 files changed, 35 insertions, 33 deletions
diff --git a/backgammon/backgammon/main.c b/backgammon/backgammon/main.c index 1a5237af..3175f70a 100644 --- a/backgammon/backgammon/main.c +++ b/backgammon/backgammon/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.19 2004/01/01 15:59:58 jsm Exp $ */ +/* $NetBSD: main.c,v 1.20 2004/02/08 22:23:50 jsm Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\ #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: main.c,v 1.19 2004/01/01 15:59:58 jsm Exp $"); +__RCSID("$NetBSD: main.c,v 1.20 2004/02/08 22:23:50 jsm Exp $"); #endif #endif /* not lint */ @@ -89,7 +89,7 @@ static char pbuf[10]; int main(argc, argv) - int argc; + int argc __attribute__((__unused__)); char **argv; { int i; /* non-descript index */ diff --git a/backgammon/teachgammon/teach.c b/backgammon/teachgammon/teach.c index 98ab026f..7d805d25 100644 --- a/backgammon/teachgammon/teach.c +++ b/backgammon/teachgammon/teach.c @@ -1,4 +1,4 @@ -/* $NetBSD: teach.c,v 1.14 2003/08/07 09:36:58 agc Exp $ */ +/* $NetBSD: teach.c,v 1.15 2004/02/08 22:23:50 jsm Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\ #if 0 static char sccsid[] = "@(#)teach.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: teach.c,v 1.14 2003/08/07 09:36:58 agc Exp $"); +__RCSID("$NetBSD: teach.c,v 1.15 2004/02/08 22:23:50 jsm Exp $"); #endif #endif /* not lint */ @@ -61,7 +61,7 @@ const char *const contin[] = { int main(argc, argv) - int argc; + int argc __attribute__((__unused__)); char *argv[]; { int i; diff --git a/cribbage/cribbage.h b/cribbage/cribbage.h index 4509ef32..ce2eecb0 100644 --- a/cribbage/cribbage.h +++ b/cribbage/cribbage.h @@ -1,4 +1,4 @@ -/* $NetBSD: cribbage.h,v 1.11 2004/01/27 20:30:29 jsm Exp $ */ +/* $NetBSD: cribbage.h,v 1.12 2004/02/08 22:23:50 jsm Exp $ */ /* * Copyright (c) 1980, 1993 @@ -57,7 +57,8 @@ extern BOOLEAN playing; /* currently playing game */ extern char explan[]; /* string for explanation */ -void addmsg(const char *, ...); +void addmsg(const char *, ...) + __attribute__((__format__(__printf__, 1, 2))); int adjust(const CARD [], CARD); int anymove(const CARD [], int, int); int anysumto(const CARD [], int, int, int); @@ -85,7 +86,8 @@ int is_one(CARD, const CARD [], int); void makeboard(void); void makedeck(CARD []); void makeknown(const CARD [], int); -void msg(const char *, ...); +void msg(const char *, ...) + __attribute__((__format__(__printf__, 1, 2))); int msgcard(CARD, BOOLEAN); int msgcrd(CARD, BOOLEAN, const char *, BOOLEAN); int number(int, int, const char *); @@ -1,4 +1,4 @@ -/* $NetBSD: dm.c,v 1.19 2004/01/27 20:30:29 jsm Exp $ */ +/* $NetBSD: dm.c,v 1.20 2004/02/08 22:23:50 jsm Exp $ */ /* * Copyright (c) 1987, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993\n\ #if 0 static char sccsid[] = "@(#)dm.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: dm.c,v 1.19 2004/01/27 20:30:29 jsm Exp $"); +__RCSID("$NetBSD: dm.c,v 1.20 2004/02/08 22:23:50 jsm Exp $"); #endif #endif /* not lint */ @@ -79,7 +79,7 @@ int users(void); int main(argc, argv) - int argc; + int argc __attribute__((__unused__)); char *argv[]; { char *cp; diff --git a/fortune/unstr/unstr.c b/fortune/unstr/unstr.c index 969af904..d5a4a0fe 100644 --- a/fortune/unstr/unstr.c +++ b/fortune/unstr/unstr.c @@ -1,4 +1,4 @@ -/* $NetBSD: unstr.c,v 1.10 2004/01/27 20:30:29 jsm Exp $ */ +/* $NetBSD: unstr.c,v 1.11 2004/02/08 22:23:50 jsm Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\ #if 0 static char sccsid[] = "@(#)unstr.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: unstr.c,v 1.10 2004/01/27 20:30:29 jsm Exp $"); +__RCSID("$NetBSD: unstr.c,v 1.11 2004/02/08 22:23:50 jsm Exp $"); #endif #endif /* not lint */ @@ -86,7 +86,7 @@ void order_unstr(STRFILE *); /* ARGSUSED */ int main(ac, av) - int ac; + int ac __attribute__((__unused__)); char **av; { static STRFILE tbl; /* description table */ diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c index 15b348dd..898cd019 100644 --- a/hunt/hunt/hunt.c +++ b/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.21 2004/01/27 20:30:29 jsm Exp $ */ +/* $NetBSD: hunt.c,v 1.22 2004/02/08 22:23:50 jsm Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hunt.c,v 1.21 2004/01/27 20:30:29 jsm Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.22 2004/02/08 22:23:50 jsm Exp $"); #endif /* not lint */ # include <sys/param.h> @@ -752,7 +752,7 @@ bad_ver() */ SIGNAL_TYPE sigterm(dummy) - int dummy; + int dummy __attribute__((__unused__)); { leavex(0, (char *) NULL); /* NOTREACHED */ @@ -765,7 +765,7 @@ sigterm(dummy) */ SIGNAL_TYPE sigusr1(dummy) - int dummy; + int dummy __attribute__((__unused__)); { leavex(1, "Unable to start driver. Try again."); /* NOTREACHED */ @@ -778,7 +778,7 @@ sigusr1(dummy) */ SIGNAL_TYPE sigalrm(dummy) - int dummy; + int dummy __attribute__((__unused__)); { return; } @@ -805,7 +805,7 @@ rmnl(s) */ SIGNAL_TYPE intr(dummy) - int dummy; + int dummy __attribute__((__unused__)); { int ch; int explained; diff --git a/hunt/hunt/otto.c b/hunt/hunt/otto.c index bd6fefb2..3fcaaeed 100644 --- a/hunt/hunt/otto.c +++ b/hunt/hunt/otto.c @@ -1,4 +1,4 @@ -/* $NetBSD: otto.c,v 1.6 2004/01/27 20:30:29 jsm Exp $ */ +/* $NetBSD: otto.c,v 1.7 2004/02/08 22:23:50 jsm Exp $ */ # ifdef OTTO /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -45,7 +45,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: otto.c,v 1.6 2004/01/27 20:30:29 jsm Exp $"); +__RCSID("$NetBSD: otto.c,v 1.7 2004/02/08 22:23:50 jsm Exp $"); #endif /* not lint */ # include <sys/time.h> @@ -156,7 +156,7 @@ extern int Otto_count; STATIC SIGNAL_TYPE nothing(dummy) - int dummy; + int dummy __attribute__((__unused__)); { } diff --git a/hunt/huntd/faketalk.c b/hunt/huntd/faketalk.c index c9237b5a..593cb4a0 100644 --- a/hunt/huntd/faketalk.c +++ b/hunt/huntd/faketalk.c @@ -1,4 +1,4 @@ -/* $NetBSD: faketalk.c,v 1.9 2004/01/27 20:30:29 jsm Exp $ */ +/* $NetBSD: faketalk.c,v 1.10 2004/02/08 22:23:50 jsm Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: faketalk.c,v 1.9 2004/01/27 20:30:29 jsm Exp $"); +__RCSID("$NetBSD: faketalk.c,v 1.10 2004/02/08 22:23:50 jsm Exp $"); #endif /* not lint */ #include "bsd.h" @@ -74,7 +74,7 @@ SIGNAL_TYPE exorcise(int); SIGNAL_TYPE exorcise(dummy) - int dummy; + int dummy __attribute__((__unused__)); { (void) wait(0); } diff --git a/hunt/huntd/hunt.h b/hunt/huntd/hunt.h index 10f35af5..0d061d14 100644 --- a/hunt/huntd/hunt.h +++ b/hunt/huntd/hunt.h @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.h,v 1.10 2004/01/27 20:30:29 jsm Exp $ */ +/* $NetBSD: hunt.h,v 1.11 2004/02/08 22:23:50 jsm Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -417,8 +417,8 @@ extern FLAG no_beep; void add_shot(int, int, int, char, int, PLAYER *, int, char); int answer(void); -void bad_con(void); -void bad_ver(void); +void bad_con(void) __attribute__((__noreturn__)); +void bad_ver(void) __attribute__((__noreturn__)); int broadcast_vec(int, struct sockaddr **); void ce(PLAYER *); void cgoto(PLAYER *, int, int); @@ -475,7 +475,7 @@ char translate(char); SIGNAL_TYPE cleanup(int) __attribute__((__noreturn__)); SIGNAL_TYPE intr(int); SIGNAL_TYPE sigalrm(int); -SIGNAL_TYPE sigemt(int); -SIGNAL_TYPE sigterm(int); -SIGNAL_TYPE sigusr1(int); +SIGNAL_TYPE sigemt(int) __attribute__((__noreturn__)); +SIGNAL_TYPE sigterm(int) __attribute__((__noreturn__)); +SIGNAL_TYPE sigusr1(int) __attribute__((__noreturn__)); SIGNAL_TYPE tstp(int); |
