NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/46004: Remove unused variables.



>Number:         46004
>Category:       bin
>Synopsis:       Remove unused variables.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 12 11:55:00 +0000 2012
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
Remove unused variables.
Found by cppcheck.
>Description:

>How-To-Repeat:

>Fix:
diff -u -p -r1.110 mkfs.c
--- sbin/newfs/mkfs.c   25 Aug 2011 16:17:58 -0000      1.110
+++ sbin/newfs/mkfs.c   11 Jan 2012 07:21:54 -0000
@@ -1335,11 +1335,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)
===================================================================
diff -u -p -r1.109 newfs.c
--- sbin/newfs/newfs.c  6 Mar 2011 17:08:17 -0000       1.109
+++ sbin/newfs/newfs.c  11 Jan 2012 07:21:54 -0000
@@ -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;



Home | Main Index | Thread Index | Old Index