Module Name:    src
Committed By:   christos
Date:           Sat Oct 19 17:23:09 UTC 2013

Modified Files:
        src/games/backgammon/teachgammon: ttext2.c
        src/games/boggle/boggle: prtable.c
        src/games/gomoku: pickmove.c
        src/games/hunt/huntd: driver.c
        src/games/sail: sync.c
        src/games/tetris: scores.c

Log Message:
fix unused variable warnings


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/games/backgammon/teachgammon/ttext2.c
cvs rdiff -u -r1.9 -r1.10 src/games/boggle/boggle/prtable.c
cvs rdiff -u -r1.21 -r1.22 src/games/gomoku/pickmove.c
cvs rdiff -u -r1.21 -r1.22 src/games/hunt/huntd/driver.c
cvs rdiff -u -r1.33 -r1.34 src/games/sail/sync.c
cvs rdiff -u -r1.20 -r1.21 src/games/tetris/scores.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/backgammon/teachgammon/ttext2.c
diff -u src/games/backgammon/teachgammon/ttext2.c:1.9 src/games/backgammon/teachgammon/ttext2.c:1.10
--- src/games/backgammon/teachgammon/ttext2.c:1.9	Mon Mar 22 01:10:19 2010
+++ src/games/backgammon/teachgammon/ttext2.c	Sat Oct 19 13:23:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttext2.c,v 1.9 2010/03/22 05:10:19 mrg Exp $	*/
+/*	$NetBSD: ttext2.c,v 1.10 2013/10/19 17:23:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)ttext2.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: ttext2.c,v 1.9 2010/03/22 05:10:19 mrg Exp $");
+__RCSID("$NetBSD: ttext2.c,v 1.10 2013/10/19 17:23:08 christos Exp $");
 #endif
 #endif				/* not lint */
 
@@ -129,14 +129,12 @@ const char   *const lastch[] = {
 int
 wrtext(const char *const *txt)
 {
-	const char  *const *begin;
 	const char   *a;
 	char    b;
 	const char   *c;
 	int     i;
 
 	fixtty(&noech);
-	begin = txt;
 	while (*txt) {
 		a = *(txt++);
 		if (*a != '\0') {
@@ -187,7 +185,6 @@ wrtext(const char *const *txt)
 			fixtty(&noech);
 			if (tflag)
 				curmove(curr, 0);
-			begin = txt;
 		}
 	}
 	fixtty(&raw);

Index: src/games/boggle/boggle/prtable.c
diff -u src/games/boggle/boggle/prtable.c:1.9 src/games/boggle/boggle/prtable.c:1.10
--- src/games/boggle/boggle/prtable.c:1.9	Fri Jul  1 12:38:24 2005
+++ src/games/boggle/boggle/prtable.c	Sat Oct 19 13:23:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: prtable.c,v 1.9 2005/07/01 16:38:24 jmc Exp $	*/
+/*	$NetBSD: prtable.c,v 1.10 2013/10/19 17:23:08 christos Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: prtable.c,v 1.9 2005/07/01 16:38:24 jmc Exp $");
+__RCSID("$NetBSD: prtable.c,v 1.10 2013/10/19 17:23:08 christos Exp $");
 #endif /* not lint */
 
 #include <curses.h>
@@ -106,6 +106,7 @@ prtable(const char *const base[], int nu
 			}
                 }
 		getyx(stdscr, row, col);
+		__USE(col);
 		move(row + 1, 0);
         }
 	refresh();

Index: src/games/gomoku/pickmove.c
diff -u src/games/gomoku/pickmove.c:1.21 src/games/gomoku/pickmove.c:1.22
--- src/games/gomoku/pickmove.c:1.21	Sat Oct 13 16:57:35 2012
+++ src/games/gomoku/pickmove.c	Sat Oct 19 13:23:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pickmove.c,v 1.21 2012/10/13 20:57:35 dholland Exp $	*/
+/*	$NetBSD: pickmove.c,v 1.22 2013/10/19 17:23:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)pickmove.c	8.2 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: pickmove.c,v 1.21 2012/10/13 20:57:35 dholland Exp $");
+__RCSID("$NetBSD: pickmove.c,v 1.22 2013/10/19 17:23:08 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -1083,7 +1083,7 @@ checkframes(struct combostr *cbp, struct
 	    int s, struct overlap_info *vertices)
 {
 	struct combostr *tcbp, *lcbp;
-	int i, n, mask, flags, verts, loop, myindex, fcnt;
+	int i, n, mask, flags, verts, myindex, fcnt;
 	union comboval cb;
 	u_char *str;
 	short *ip;
@@ -1094,7 +1094,6 @@ checkframes(struct combostr *cbp, struct
 	cb.s = s;
 	fcnt = cb.c.a - 2;
 	verts = 0;
-	loop = 0;
 	myindex = cbp->c_nframes;
 	n = (fcbp - frames) * FAREA;
 	str = &overlap[n];

Index: src/games/hunt/huntd/driver.c
diff -u src/games/hunt/huntd/driver.c:1.21 src/games/hunt/huntd/driver.c:1.22
--- src/games/hunt/huntd/driver.c:1.21	Wed Aug 31 12:24:56 2011
+++ src/games/hunt/huntd/driver.c	Sat Oct 19 13:23:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: driver.c,v 1.21 2011/08/31 16:24:56 plunky Exp $	*/
+/*	$NetBSD: driver.c,v 1.22 2013/10/19 17:23:08 christos 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: driver.c,v 1.21 2011/08/31 16:24:56 plunky Exp $");
+__RCSID("$NetBSD: driver.c,v 1.22 2013/10/19 17:23:08 christos Exp $");
 #endif /* not lint */
 
 #include <sys/ioctl.h>
@@ -88,7 +88,7 @@ main(int ac, char **av, char **ep)
 	PLAYER *pp;
 #ifdef INTERNET
 	u_short msg;
-	short port_num, reply;
+	short reply;
 	socklen_t namelen;
 	SOCKET test;
 #endif
@@ -143,7 +143,6 @@ again:
 #ifdef INTERNET
 		if (fdset[2].revents & POLLIN) {
 			namelen = DAEMON_SIZE;
-			port_num = htons(sock_port);
 			(void) recvfrom(Test_socket, &msg, sizeof msg,
 				0, (struct sockaddr *) &test, &namelen);
 			switch (ntohs(msg)) {
@@ -599,7 +598,6 @@ zap(PLAYER *pp, FLAG was_player, int i)
 	BULLET *bp;
 	PLAYER *np;
 	int x, y;
-	int savefd;
 
 	if (was_player) {
 		if (pp->p_undershot)
@@ -622,8 +620,6 @@ zap(PLAYER *pp, FLAG was_player, int i)
 	outstr(pp, pp->p_death, len);
 	cgoto(pp, HEIGHT, 0);
 
-	savefd = pp->p_fd;
-
 #ifdef MONITOR
 	if (was_player) {
 #endif

Index: src/games/sail/sync.c
diff -u src/games/sail/sync.c:1.33 src/games/sail/sync.c:1.34
--- src/games/sail/sync.c:1.33	Sat Mar 14 19:47:18 2009
+++ src/games/sail/sync.c	Sat Oct 19 13:23:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sync.c,v 1.33 2009/03/14 23:47:18 dholland Exp $	*/
+/*	$NetBSD: sync.c,v 1.34 2013/10/19 17:23:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)sync.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: sync.c,v 1.33 2009/03/14 23:47:18 dholland Exp $");
+__RCSID("$NetBSD: sync.c,v 1.34 2013/10/19 17:23:08 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -247,13 +247,12 @@ int
 sync_open(void)
 {
 	const char *sync_file;
-	const char *sync_lock;
 	struct stat tmp;
 
 	if (sync_fp != NULL)
 		fclose(sync_fp);
 	sync_file = get_sync_file(game);
-	sync_lock = get_lock_file(game);
+	(void)get_lock_file(game);
 	setegid(egid);
 	if (stat(sync_file, &tmp) < 0) {
 		mode_t omask = umask(002);

Index: src/games/tetris/scores.c
diff -u src/games/tetris/scores.c:1.20 src/games/tetris/scores.c:1.21
--- src/games/tetris/scores.c:1.20	Wed Jan  5 10:48:00 2011
+++ src/games/tetris/scores.c	Sat Oct 19 13:23:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: scores.c,v 1.20 2011/01/05 15:48:00 wiz Exp $	*/
+/*	$NetBSD: scores.c,v 1.21 2013/10/19 17:23:08 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -381,9 +381,8 @@ getscores(int *fdp)
 	struct highscore_header header;
 	int sd, mint, lck;
 	mode_t mask;
-	const char *mstr, *human;
+	const char *human;
 	int doflip;
-	int serrno;
 	ssize_t result;
 
 #ifdef ALLOW_SCORE_UPDATES
@@ -395,14 +394,12 @@ getscores(int *fdp)
 #endif
 	{
 		mint = O_RDONLY;
-		mstr = "r";
 		human = "reading";
 		lck = LOCK_SH;
 	}
 	setegid(egid);
 	mask = umask(S_IWOTH);
 	sd = open(_PATH_SCOREFILE, mint, 0666);
-	serrno = errno;
 	(void)umask(mask);
 	setegid(gid);
 	if (sd < 0) {

Reply via email to