diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2007-10-17 20:10:45 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2007-10-17 20:10:45 +0000 |
commit | 6ebd6f0640abbc5048b4975c40fac23ec404930b (patch) | |
tree | e364116c961d5cba80890eb55637a78439f78bf8 | |
parent | 4f4368721b2619584d945f74ab23327bad6ac500 (diff) |
remove "unused variable" warnings
tested by deraadt@ on a gcc2 arch
looks ok ray@ ok deraadt@
-rw-r--r-- | bin/rcp/util.c | 5 | ||||
-rw-r--r-- | games/backgammon/common_source/subs.c | 5 | ||||
-rw-r--r-- | lib/csu/amd64/crt0.c | 3 | ||||
-rw-r--r-- | lib/libcurses/base/keybound.c | 4 | ||||
-rw-r--r-- | usr.bin/calendar/io.c | 5 | ||||
-rw-r--r-- | usr.bin/oldrdist/server.c | 6 | ||||
-rw-r--r-- | usr.bin/sup/src/supcmain.c | 4 | ||||
-rw-r--r-- | usr.bin/telnet/utilities.c | 4 | ||||
-rw-r--r-- | usr.bin/tn3270/tools/mkastosc/mkastosc.c | 6 | ||||
-rw-r--r-- | usr.bin/tn3270/tools/mkhits/dohits.c | 10 | ||||
-rw-r--r-- | usr.bin/vi/cl/cl_main.c | 5 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/func.c | 5 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/tree.c | 7 | ||||
-rw-r--r-- | usr.sbin/acpidump/acpi.c | 7 | ||||
-rw-r--r-- | usr.sbin/pppd/options.c | 6 | ||||
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 7 | ||||
-rw-r--r-- | usr.sbin/timed/timed/timed.c | 3 |
17 files changed, 39 insertions, 53 deletions
diff --git a/bin/rcp/util.c b/bin/rcp/util.c index 308dc95ff6d..80c44354c69 100644 --- a/bin/rcp/util.c +++ b/bin/rcp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.16 2006/03/12 01:51:15 djm Exp $ */ +/* $OpenBSD: util.c,v 1.17 2007/10/17 20:10:44 chl Exp $ */ /* $NetBSD: util.c,v 1.2 1995/03/21 08:19:08 cgd Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)util.c 8.2 (Berkeley) 4/2/94"; #else -static const char rcsid[] = "$OpenBSD: util.c,v 1.16 2006/03/12 01:51:15 djm Exp $"; +static const char rcsid[] = "$OpenBSD: util.c,v 1.17 2007/10/17 20:10:44 chl Exp $"; #endif #endif /* not lint */ @@ -164,7 +164,6 @@ killchild(int signo) int do_local_cmd(arglist *a, uid_t userid, gid_t groupid) { - u_int i; int status; pid_t pid; diff --git a/games/backgammon/common_source/subs.c b/games/backgammon/common_source/subs.c index ce108cc07e3..11b32970936 100644 --- a/games/backgammon/common_source/subs.c +++ b/games/backgammon/common_source/subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subs.c,v 1.15 2006/10/31 18:15:15 ray Exp $ */ +/* $OpenBSD: subs.c,v 1.16 2007/10/17 20:10:44 chl Exp $ */ /* * Copyright (c) 1980, 1993 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)subs.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: subs.c,v 1.15 2006/10/31 18:15:15 ray Exp $"; +static char rcsid[] = "$OpenBSD: subs.c,v 1.16 2007/10/17 20:10:44 chl Exp $"; #endif #endif /* not lint */ @@ -201,7 +201,6 @@ getarg(argc,argv) char **argv; { int ch; - int j; while ((ch = getopt(argc, argv, "bdnrs:w")) != -1) switch((char)ch) { diff --git a/lib/csu/amd64/crt0.c b/lib/csu/amd64/crt0.c index 1189a7950b2..e2713e90238 100644 --- a/lib/csu/amd64/crt0.c +++ b/lib/csu/amd64/crt0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crt0.c,v 1.2 2005/08/04 16:33:05 espie Exp $ */ +/* $OpenBSD: crt0.c,v 1.3 2007/10/17 20:10:44 chl Exp $ */ /* * Copyright (c) 1995 Christopher G. Demetriou * All rights reserved. @@ -74,7 +74,6 @@ ___start(argc, argv, envp, cleanup, obj, ps_strings) struct ps_strings *ps_strings; { char *namep; - register struct kframe *kfp; char *s; environ = envp; diff --git a/lib/libcurses/base/keybound.c b/lib/libcurses/base/keybound.c index 91bdfb8700d..7bb74aad505 100644 --- a/lib/libcurses/base/keybound.c +++ b/lib/libcurses/base/keybound.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keybound.c,v 1.3 2006/05/14 09:01:06 espie Exp $ */ +/* $OpenBSD: keybound.c,v 1.4 2007/10/17 20:10:44 chl Exp $ */ /**************************************************************************** * Copyright (c) 1999,2000 Free Software Foundation, Inc. * @@ -45,8 +45,6 @@ MODULE_ID("$From: keybound.c,v 1.3 2000/12/10 02:43:26 tom Exp $") NCURSES_EXPORT(char *) keybound(int code, int count) { - unsigned short k; - if (code < 0 || code > (int)USHRT_MAX) { return NULL; } else { diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 415bda240ca..baddceef2df 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.33 2006/12/11 20:50:54 deraadt Exp $ */ +/* $OpenBSD: io.c,v 1.34 2007/10/17 20:10:44 chl Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -39,7 +39,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94"; #else -static const char rcsid[] = "$OpenBSD: io.c,v 1.33 2006/12/11 20:50:54 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: io.c,v 1.34 2007/10/17 20:10:44 chl Exp $"; #endif #endif /* not lint */ @@ -85,7 +85,6 @@ cal(void) struct event *events, *cur_evt, *ev1, *tmp; char buf[2048 + 1], *prefix = NULL, *p; struct match *m; - size_t nlen; FILE *fp; events = NULL; diff --git a/usr.bin/oldrdist/server.c b/usr.bin/oldrdist/server.c index d52898383be..f5156827341 100644 --- a/usr.bin/oldrdist/server.c +++ b/usr.bin/oldrdist/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.30 2007/02/08 03:19:13 ray Exp $ */ +/* $OpenBSD: server.c,v 1.31 2007/10/17 20:10:44 chl Exp $ */ /* * Copyright (c) 1983, 1993 @@ -31,7 +31,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)server.c 8.1 (Berkeley) 6/9/93"; */ -static char *rcsid = "$OpenBSD: server.c,v 1.30 2007/02/08 03:19:13 ray Exp $"; +static char *rcsid = "$OpenBSD: server.c,v 1.31 2007/10/17 20:10:44 chl Exp $"; #endif /* not lint */ #include <sys/wait.h> @@ -1369,8 +1369,10 @@ dospecial(cmd) char *cp, *s; char sbuf[BUFSIZ]; pid_t pid, i; +#if defined(DIRECT_RCMD) extern uid_t userid; extern gid_t groupid; +#endif /* DIRECT_RCMD */ if (pipe(fd) < 0) { error("%s\n", strerror(errno)); diff --git a/usr.bin/sup/src/supcmain.c b/usr.bin/sup/src/supcmain.c index d745152d2a1..3c667af4d1e 100644 --- a/usr.bin/sup/src/supcmain.c +++ b/usr.bin/sup/src/supcmain.c @@ -1,4 +1,4 @@ -/* $OpenBSD: supcmain.c,v 1.21 2007/09/11 15:47:17 gilles Exp $ */ +/* $OpenBSD: supcmain.c,v 1.22 2007/10/17 20:10:44 chl Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -592,7 +592,7 @@ init(argc, argv) int argc; char **argv; { - char buf[STRINGLENGTH], *p, *q; + char buf[STRINGLENGTH], *p; char username[STRINGLENGTH]; char *supfname, *arg; COLLECTION *c, *lastC; diff --git a/usr.bin/telnet/utilities.c b/usr.bin/telnet/utilities.c index 3b5f5c2ed7a..8cdea5f1a3e 100644 --- a/usr.bin/telnet/utilities.c +++ b/usr.bin/telnet/utilities.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utilities.c,v 1.9 2003/06/03 02:56:18 millert Exp $ */ +/* $OpenBSD: utilities.c,v 1.10 2007/10/17 20:10:44 chl Exp $ */ /* $NetBSD: utilities.c,v 1.5 1996/02/28 21:04:21 thorpej Exp $ */ /* @@ -277,7 +277,9 @@ printsub(direction, pointer, length) int length; /* length of suboption data */ { int i; +#if defined(AUTHENTICATION) || defined(ENCRYPTION) char buf[512]; +#endif extern int want_status_response; if (showoptions || direction == 0 || diff --git a/usr.bin/tn3270/tools/mkastosc/mkastosc.c b/usr.bin/tn3270/tools/mkastosc/mkastosc.c index 98f203d849b..13f05d42c29 100644 --- a/usr.bin/tn3270/tools/mkastosc/mkastosc.c +++ b/usr.bin/tn3270/tools/mkastosc/mkastosc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkastosc.c,v 1.3 2003/06/03 02:56:19 millert Exp $ */ +/* $OpenBSD: mkastosc.c,v 1.4 2007/10/17 20:10:44 chl Exp $ */ /*- * Copyright (c) 1988 The Regents of the University of California. @@ -37,7 +37,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)mkastosc.c 4.2 (Berkeley) 4/26/91";*/ -static char rcsid[] = "$OpenBSD: mkastosc.c,v 1.3 2003/06/03 02:56:19 millert Exp $"; +static char rcsid[] = "$OpenBSD: mkastosc.c,v 1.4 2007/10/17 20:10:44 chl Exp $"; #endif /* not lint */ #include <stdio.h> @@ -68,10 +68,8 @@ char *argv[]; { int scancode; int asciicode; - int empty; int i; int c; - int found; struct hits *ph; struct Hits *Ph; struct thing *this; diff --git a/usr.bin/tn3270/tools/mkhits/dohits.c b/usr.bin/tn3270/tools/mkhits/dohits.c index 11059beabbf..72c1dcbe829 100644 --- a/usr.bin/tn3270/tools/mkhits/dohits.c +++ b/usr.bin/tn3270/tools/mkhits/dohits.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dohits.c,v 1.9 2007/09/25 11:35:00 chl Exp $ */ +/* $OpenBSD: dohits.c,v 1.10 2007/10/17 20:10:44 chl Exp $ */ /*- * Copyright (c) 1988 The Regents of the University of California. @@ -31,7 +31,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)dohits.c 4.2 (Berkeley) 4/26/91";*/ -static char rcsid[] = "$OpenBSD: dohits.c,v 1.9 2007/09/25 11:35:00 chl Exp $"; +static char rcsid[] = "$OpenBSD: dohits.c,v 1.10 2007/10/17 20:10:44 chl Exp $"; #endif /* not lint */ /* @@ -114,7 +114,7 @@ char *file, /* Name of file to scan for whitespace prefix */ { FILE *ourfile; char compare[100]; - char what[100], value[100]; + char what[100]; char line[200]; snprintf(compare, sizeof compare, " %s%%[^,\t \n]", prefix); @@ -233,11 +233,7 @@ char *aidfile, *fcnfile; unsigned char plain[100], shifted[100], alted[100], shiftalted[100]; unsigned char line[200]; int keynumber, scancode; - int empty; - int i; struct hit *hit; - struct hits *ph; - struct Hits *Ph; memset((char *)Hits, 0, sizeof Hits); diff --git a/usr.bin/vi/cl/cl_main.c b/usr.bin/vi/cl/cl_main.c index 4dc0e354aa8..0cd9ccf8076 100644 --- a/usr.bin/vi/cl/cl_main.c +++ b/usr.bin/vi/cl/cl_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl_main.c,v 1.17 2006/04/22 03:09:15 ray Exp $ */ +/* $OpenBSD: cl_main.c,v 1.18 2007/10/17 20:10:44 chl Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -62,8 +62,9 @@ main(argc, argv) GS *gp; size_t rows, cols; int rval; - char *ip_arg, *ttype; + char *ttype; #ifdef RUNNING_IP + char *ip_arg; char **p_av, **t_av; #endif diff --git a/usr.bin/xlint/lint1/func.c b/usr.bin/xlint/lint1/func.c index 1afbaf56430..535c7c96d1a 100644 --- a/usr.bin/xlint/lint1/func.c +++ b/usr.bin/xlint/lint1/func.c @@ -1,4 +1,4 @@ -/* $OpenBSD: func.c,v 1.19 2007/09/06 22:02:03 cloder Exp $ */ +/* $OpenBSD: func.c,v 1.20 2007/10/17 20:10:44 chl Exp $ */ /* $NetBSD: func.c,v 1.7 1995/10/02 17:31:40 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: func.c,v 1.19 2007/09/06 22:02:03 cloder Exp $"; +static char rcsid[] = "$OpenBSD: func.c,v 1.20 2007/10/17 20:10:44 chl Exp $"; #endif #include <stdlib.h> @@ -586,7 +586,6 @@ if3(int els) void switch1(tnode_t *tn) { - tspec_t t; type_t *tp; if (tn != NULL) diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c index 843394480e5..c674be2e743 100644 --- a/usr.bin/xlint/lint1/tree.c +++ b/usr.bin/xlint/lint1/tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tree.c,v 1.45 2007/09/08 17:49:19 cloder Exp $ */ +/* $OpenBSD: tree.c,v 1.46 2007/10/17 20:10:44 chl Exp $ */ /* $NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: tree.c,v 1.45 2007/09/08 17:49:19 cloder Exp $"; +static char rcsid[] = "$OpenBSD: tree.c,v 1.46 2007/10/17 20:10:44 chl Exp $"; #endif #include <stdlib.h> @@ -736,7 +736,6 @@ typeok(op_t op, farg_t *farg, tnode_t *ln, tnode_t *rn) olt = NOTSPEC, ort = NOTSPEC; type_t *ltp, *rtp, *lstp, *rstp; tnode_t *tn; - int arg = (farg) ? farg->fa_num : 0; mp = &modtab[op]; @@ -1513,7 +1512,7 @@ static void balance(op_t op, tnode_t **lnp, tnode_t **rnp) { tspec_t lt, rt, t; - int i, u; + int i; type_t *ntp; static tspec_t tl[] = { LDOUBLE, DOUBLE, FLOAT, UQUAD, QUAD, ULONG, LONG, UINT, INT, diff --git a/usr.sbin/acpidump/acpi.c b/usr.sbin/acpidump/acpi.c index 390c649c21f..5b3a069c1a0 100644 --- a/usr.sbin/acpidump/acpi.c +++ b/usr.sbin/acpidump/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.4 2007/02/22 19:09:26 jordan Exp $ */ +/* $OpenBSD: acpi.c,v 1.5 2007/10/17 20:10:44 chl Exp $ */ /*- * Copyright (c) 1998 Doug Rabson * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: acpi.c,v 1.4 2007/02/22 19:09:26 jordan Exp $ + * $Id: acpi.c,v 1.5 2007/10/17 20:10:44 chl Exp $ * $FreeBSD: src/usr.sbin/acpi/acpidump/acpi.c,v 1.3 2000/11/08 02:37:00 iwasaki Exp $ */ #include <sys/types.h> @@ -62,8 +62,6 @@ acpi_trim_string(char *s, size_t length) static void acpi_print_dsdt_definition(void) { - int len; - char *p; char oemid[6 + 1]; char oemtblid[8 + 1]; @@ -104,7 +102,6 @@ acpi_handle_dsdt(struct ACPIsdt *dsdp) { u_int8_t *dp; u_int8_t *end; - extern struct aml_environ asl_env; acpi_print_dsdt(dsdp); diff --git a/usr.sbin/pppd/options.c b/usr.sbin/pppd/options.c index d1ac267367c..8dd3d7680e5 100644 --- a/usr.sbin/pppd/options.c +++ b/usr.sbin/pppd/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.22 2007/06/04 14:59:45 henning Exp $ */ +/* $OpenBSD: options.c,v 1.23 2007/10/17 20:10:44 chl Exp $ */ /* * options.c - handles option processing for PPP. @@ -46,7 +46,7 @@ #if 0 static char rcsid[] = "Id: options.c,v 1.42 1998/03/26 04:46:06 paulus Exp $"; #else -static char rcsid[] = "$OpenBSD: options.c,v 1.22 2007/06/04 14:59:45 henning Exp $"; +static char rcsid[] = "$OpenBSD: options.c,v 1.23 2007/10/17 20:10:44 chl Exp $"; #endif #endif @@ -667,7 +667,7 @@ options_from_user() int options_for_tty() { - char *dev, *path, *p; + char *dev, *path; int ret; dev = devnam; diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 1de648da7a1..f827adbec7c 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslogd.c,v 1.99 2007/09/07 20:55:26 bluhm Exp $ */ +/* $OpenBSD: syslogd.c,v 1.100 2007/10/17 20:10:44 chl Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -39,7 +39,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -static const char rcsid[] = "$OpenBSD: syslogd.c,v 1.99 2007/09/07 20:55:26 bluhm Exp $"; +static const char rcsid[] = "$OpenBSD: syslogd.c,v 1.100 2007/10/17 20:10:44 chl Exp $"; #endif #endif /* not lint */ @@ -202,7 +202,6 @@ int Startup = 1; /* startup flag */ char LocalHostName[MAXHOSTNAMELEN]; /* our hostname */ char *LocalDomain; /* our local domain name */ int InetInuse = 0; /* non-zero if INET sockets are being used */ -int LogPort; /* port number for INET connections */ int Initialized = 0; /* set when we have initialized ourselves */ int MarkInterval = 20 * 60; /* interval between marks in seconds */ @@ -294,7 +293,7 @@ main(int argc, char *argv[]) { int ch, i, linesize, fd; struct sockaddr_un fromunix; - struct sockaddr_in s_in, frominet; + struct sockaddr_in frominet; socklen_t len; char *p, *line; char resolve[MAXHOSTNAMELEN]; diff --git a/usr.sbin/timed/timed/timed.c b/usr.sbin/timed/timed/timed.c index 0ab033492e7..3ad40749f22 100644 --- a/usr.sbin/timed/timed/timed.c +++ b/usr.sbin/timed/timed/timed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: timed.c,v 1.26 2007/02/19 22:39:57 jmc Exp $ */ +/* $OpenBSD: timed.c,v 1.27 2007/10/17 20:10:44 chl Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -132,7 +132,6 @@ main(int argc, char **argv) struct nets *nt; struct sockaddr_in server; u_short port; - int inlen = 8192; int ch; struct ifaddrs *ifap, *ifa; |