Module Name:    src
Committed By:   wiz
Date:           Mon Feb 13 12:59:56 UTC 2012

Modified Files:
        src/sbin/newfs: mkfs.c newfs.c

Log Message:
Remove unused variables.
>From cppcheck via Henning Petersen in PR 46004.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sbin/newfs/mkfs.c
cvs rdiff -u -r1.109 -r1.110 src/sbin/newfs/newfs.c

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

Modified files:

Index: src/sbin/newfs/mkfs.c
diff -u src/sbin/newfs/mkfs.c:1.111 src/sbin/newfs/mkfs.c:1.112
--- src/sbin/newfs/mkfs.c:1.111	Tue Feb  7 14:14:45 2012
+++ src/sbin/newfs/mkfs.c	Mon Feb 13 12:59:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkfs.c,v 1.111 2012/02/07 14:14:45 tsutsui Exp $	*/
+/*	$NetBSD: mkfs.c,v 1.112 2012/02/13 12:59:56 wiz Exp $	*/
 
 /*
  * Copyright (c) 1980, 1989, 1993
@@ -73,7 +73,7 @@
 #if 0
 static char sccsid[] = "@(#)mkfs.c	8.11 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: mkfs.c,v 1.111 2012/02/07 14:14:45 tsutsui Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.112 2012/02/13 12:59:56 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -1343,11 +1343,10 @@ static void
 iput(union dinode *ip, ino_t ino)
 {
 	daddr_t d;
-	int c, i;
+	int i;
 	struct ufs1_dinode *dp1;
 	struct ufs2_dinode *dp2;
 
-	c = ino_to_cg(&sblock, ino);
 	rdfs(fsbtodb(&sblock, cgtod(&sblock, 0)), sblock.fs_cgsize, &acg);
 	/* fs -> host byte order */
 	if (needswap)

Index: src/sbin/newfs/newfs.c
diff -u src/sbin/newfs/newfs.c:1.109 src/sbin/newfs/newfs.c:1.110
--- src/sbin/newfs/newfs.c:1.109	Sun Mar  6 17:08:17 2011
+++ src/sbin/newfs/newfs.c	Mon Feb 13 12:59:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: newfs.c,v 1.109 2011/03/06 17:08:17 bouyer Exp $	*/
+/*	$NetBSD: newfs.c,v 1.110 2012/02/13 12:59:56 wiz Exp $	*/
 
 /*
  * Copyright (c) 1983, 1989, 1993, 1994
@@ -78,7 +78,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)newfs.c	8.13 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: newfs.c,v 1.109 2011/03/06 17:08:17 bouyer Exp $");
+__RCSID("$NetBSD: newfs.c,v 1.110 2012/02/13 12:59:56 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -239,7 +239,7 @@ main(int argc, char *argv[])
 	struct statvfs *mp;
 	struct stat sb;
 	int ch, fsi, fso, len, n, Fflag, Iflag, Zflag;
-	char *cp, *s1, *s2, *special;
+	char *s1, *s2, *special;
 	const char *opstring;
 	int byte_sized = 0;
 #ifdef MFS
@@ -255,7 +255,6 @@ main(int argc, char *argv[])
 	gid_t mfsgid = 0;	/* group wheel */
 	mntoptparse_t mo;
 
-	cp = NULL;
 	fsi = fso = -1;
 	Fflag = Iflag = Zflag = 0;
 	verbosity = -1;

Reply via email to