From efba6f5083025218647785ab5d1ac16fd770d04a Mon Sep 17 00:00:00 2001 From: chl Date: Fri, 14 Sep 2007 14:29:20 +0000 Subject: remove some warnings: unused variable `variable' `variable' might be used uninitialized in this function ok gilles@ ray@ --- games/atc/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'games/atc') diff --git a/games/atc/main.c b/games/atc/main.c index ab15b9f3603..335ff78240b 100644 --- a/games/atc/main.c +++ b/games/atc/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.18 2007/09/11 15:21:05 gilles Exp $ */ +/* $OpenBSD: main.c,v 1.19 2007/09/14 14:29:20 chl Exp $ */ /* $NetBSD: main.c,v 1.4 1995/04/27 21:22:25 mycroft Exp $ */ /*- @@ -52,7 +52,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.18 2007/09/11 15:21:05 gilles Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.19 2007/09/14 14:29:20 chl Exp $"; #endif #endif /* not lint */ @@ -257,7 +257,7 @@ default_game(void) { FILE *fp; static char file[256]; - char line[256], games[256], *p; + char line[256], games[256]; strlcpy(games, _PATH_GAMES, sizeof games); strlcat(games, GAMES, sizeof games); @@ -299,8 +299,6 @@ okay_game(const char *s) return (NULL); } while (fgets(line, sizeof(line), fp) != NULL) { - char *p; - line[strcspn(line, "\n")] = '\0'; if (strcmp(s, line) == 0) { if (strlen(line) + strlen(_PATH_GAMES) >= sizeof(file)) { -- cgit v1.2.3-59-g8ed1b