Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin fix unused variable warnings.
details: https://anonhg.NetBSD.org/src/rev/8bf2fdb45dca
branches: trunk
changeset: 790663:8bf2fdb45dca
user: christos <christos%NetBSD.org@localhost>
date: Sat Oct 19 01:09:58 2013 +0000
description:
fix unused variable warnings.
diffstat:
sbin/apmlabel/apmlabel.c | 7 +++----
sbin/dmctl/dmctl.c | 6 +++---
sbin/fsck_ffs/pass1.c | 8 ++------
sbin/fsck_ffs/utilities.c | 10 +++-------
sbin/fsck_lfs/bufcache.c | 5 ++---
sbin/fsck_lfs/lfs.c | 17 ++++-------------
sbin/fsck_lfs/pass6.c | 8 ++------
sbin/fsck_lfs/segwrite.c | 6 +++---
sbin/fsirand/fsirand.c | 7 +++----
sbin/mount_lfs/mount_lfs.c | 6 ++----
sbin/mount_nilfs/mount_nilfs.c | 6 ++----
sbin/mount_portal/pt_file.c | 7 +++----
sbin/newfs_ext2fs/newfs_ext2fs.c | 7 +++----
sbin/newfs_lfs/make_lfs.c | 8 +++-----
sbin/newfs_msdos/mkfs_msdos.c | 9 ++++-----
sbin/newfs_udf/udf_create.c | 26 ++++++++++++--------------
sbin/raidctl/raidctl.c | 6 ++----
sbin/rcorder/rcorder.c | 8 +++++---
18 files changed, 61 insertions(+), 96 deletions(-)
diffs (truncated from 731 to 300 lines):
diff -r 83ff2a8ffd39 -r 8bf2fdb45dca sbin/apmlabel/apmlabel.c
--- a/sbin/apmlabel/apmlabel.c Sat Oct 19 01:09:16 2013 +0000
+++ b/sbin/apmlabel/apmlabel.c Sat Oct 19 01:09:58 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apmlabel.c,v 1.2 2011/08/27 16:10:51 joerg Exp $ */
+/* $NetBSD: apmlabel.c,v 1.3 2013/10/19 01:09:58 christos Exp $ */
/*
* Copyright (C) 1998 Wolfgang Solfrank.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: apmlabel.c,v 1.2 2011/08/27 16:10:51 joerg Exp $");
+__RCSID("$NetBSD: apmlabel.c,v 1.3 2013/10/19 01:09:58 christos Exp $");
#endif /* not lint */
#include <stdio.h>
@@ -104,7 +104,7 @@
struct apple_drvr_map *drvr;
struct apple_part_map_entry *part;
struct partition npe;
- uint16_t blksize, blkcnt, partcnt;
+ uint16_t blksize, partcnt;
int i, j, unused, changed;
uint64_t temp;
@@ -123,7 +123,6 @@
if (drvr->sbSig != APPLE_DRVR_MAP_MAGIC)
return (changed);
blksize = drvr->sbBlockSize;
- blkcnt = drvr->sbBlkCount;
partcnt = 1;
diff -r 83ff2a8ffd39 -r 8bf2fdb45dca sbin/dmctl/dmctl.c
--- a/sbin/dmctl/dmctl.c Sat Oct 19 01:09:16 2013 +0000
+++ b/sbin/dmctl/dmctl.c Sat Oct 19 01:09:58 2013 +0000
@@ -213,16 +213,16 @@
static int
dmctl_get_version(int argc __unused, char *argv[] __unused, libdm_task_t task)
{
- uint32_t ver[3], size;
+ uint32_t ver[3];
- size = libdm_task_get_cmd_version(task, ver, sizeof(ver));
+ (void)libdm_task_get_cmd_version(task, ver, sizeof(ver));
printf("Library protocol version %d:%d:%d\n", ver[0], ver[1], ver[2]);
if (libdm_task_run(task) != 0)
err(EXIT_FAILURE, "dmctl_get_version: libdm_task_run failed.");
- size = libdm_task_get_cmd_version(task, ver, 3);
+ (void)libdm_task_get_cmd_version(task, ver, 3);
printf("Kernel protocol version %d:%d:%d\n",ver[0], ver[1], ver[2]);
libdm_task_destroy(task);
diff -r 83ff2a8ffd39 -r 8bf2fdb45dca sbin/fsck_ffs/pass1.c
--- a/sbin/fsck_ffs/pass1.c Sat Oct 19 01:09:16 2013 +0000
+++ b/sbin/fsck_ffs/pass1.c Sat Oct 19 01:09:58 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass1.c,v 1.55 2013/06/23 07:28:36 dholland Exp $ */
+/* $NetBSD: pass1.c,v 1.56 2013/10/19 01:09:58 christos Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pass1.c 8.6 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: pass1.c,v 1.55 2013/06/23 07:28:36 dholland Exp $");
+__RCSID("$NetBSD: pass1.c,v 1.56 2013/10/19 01:09:58 christos Exp $");
#endif
#endif /* not lint */
@@ -235,15 +235,11 @@
int64_t blocks;
char symbuf[MAXBSIZE];
struct inostat *info;
- uid_t uid;
- gid_t gid;
dp = getnextinode(inumber);
info = inoinfo(inumber);
mode = iswap16(DIP(dp, mode)) & IFMT;
size = iswap64(DIP(dp, size));
- uid = iswap32(DIP(dp, uid));
- gid = iswap32(DIP(dp, gid));
if (mode == 0) {
if ((is_ufs2 &&
(memcmp(dp->dp2.di_db, ufs2_zino.di_db,
diff -r 83ff2a8ffd39 -r 8bf2fdb45dca sbin/fsck_ffs/utilities.c
--- a/sbin/fsck_ffs/utilities.c Sat Oct 19 01:09:16 2013 +0000
+++ b/sbin/fsck_ffs/utilities.c Sat Oct 19 01:09:58 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: utilities.c,v 1.63 2013/06/23 22:03:34 dholland Exp $ */
+/* $NetBSD: utilities.c,v 1.64 2013/10/19 01:09:58 christos Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)utilities.c 8.6 (Berkeley) 5/19/95";
#else
-__RCSID("$NetBSD: utilities.c,v 1.63 2013/06/23 22:03:34 dholland Exp $");
+__RCSID("$NetBSD: utilities.c,v 1.64 2013/10/19 01:09:58 christos Exp $");
#endif
#endif /* not lint */
@@ -263,7 +263,7 @@
ckfini(int noint)
{
struct bufarea *bp, *nbp;
- int ofsmodified, cnt = 0;
+ int cnt = 0;
if (!noint) {
if (doinglevel2)
@@ -314,11 +314,7 @@
sblock->fs_pendingblocks = 0;
sblock->fs_pendinginodes = 0;
sbdirty();
- ofsmodified = fsmodified;
flush(fswritefd, &sblk);
-#if LITE2BORKEN
- fsmodified = ofsmodified;
-#endif
if (!preen)
printf(
"\n***** FILE SYSTEM MARKED CLEAN *****\n");
diff -r 83ff2a8ffd39 -r 8bf2fdb45dca sbin/fsck_lfs/bufcache.c
--- a/sbin/fsck_lfs/bufcache.c Sat Oct 19 01:09:16 2013 +0000
+++ b/sbin/fsck_lfs/bufcache.c Sat Oct 19 01:09:58 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bufcache.c,v 1.13 2008/05/16 09:21:59 hannken Exp $ */
+/* $NetBSD: bufcache.c,v 1.14 2013/10/19 01:09:58 christos Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -344,7 +344,6 @@
{
struct ubuf *bp;
daddr_t daddr;
- int error;
bp = getblk(vp, lbn, size);
*bpp = bp;
@@ -359,7 +358,7 @@
* and load it in.
*/
daddr = -1;
- error = VOP_BMAP(vp, lbn, &daddr);
+ (void)VOP_BMAP(vp, lbn, &daddr);
bp->b_blkno = daddr;
if (daddr >= 0) {
bp->b_flags |= B_READ;
diff -r 83ff2a8ffd39 -r 8bf2fdb45dca sbin/fsck_lfs/lfs.c
--- a/sbin/fsck_lfs/lfs.c Sat Oct 19 01:09:16 2013 +0000
+++ b/sbin/fsck_lfs/lfs.c Sat Oct 19 01:09:58 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.40 2013/06/18 18:18:58 christos Exp $ */
+/* $NetBSD: lfs.c,v 1.41 2013/10/19 01:09:58 christos Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -451,7 +451,6 @@
struct ubuf *bp;
int tryalt;
struct lfs *fs, *altfs;
- int error;
vfs_init();
@@ -480,7 +479,7 @@
dev_bsize = DEV_BSIZE;
- error = bread(devvp, sblkno, LFS_SBPAD, NOCRED, 0, &bp);
+ (void)bread(devvp, sblkno, LFS_SBPAD, NOCRED, 0, &bp);
fs = ecalloc(1, sizeof(*fs));
fs->lfs_dlfs = *((struct dlfs *) bp->b_data);
fs->lfs_devvp = devvp;
@@ -490,7 +489,7 @@
dev_bsize = fs->lfs_fsize >> fs->lfs_fsbtodb;
if (tryalt) {
- error = bread(devvp, LFS_FSBTODB(fs, fs->lfs_sboffs[1]),
+ (void)bread(devvp, LFS_FSBTODB(fs, fs->lfs_sboffs[1]),
LFS_SBPAD, NOCRED, 0, &bp);
altfs = ecalloc(1, sizeof(*altfs));
altfs->lfs_dlfs = *((struct dlfs *) bp->b_data);
@@ -744,17 +743,13 @@
FINFO *fp;
int bc; /* Bytes in partial segment */
int nblocks;
- ulfs_daddr_t seg_addr, daddr;
+ ulfs_daddr_t daddr;
ulfs_daddr_t *dp, *idp;
struct ubuf *bp;
int i, j, k, datac, len;
- long sn;
u_int32_t *datap;
u_int32_t ccksum;
- sn = lfs_dtosn(fs, pseg_addr);
- seg_addr = lfs_sntod(fs, sn);
-
/* We've already checked the sumsum, just do the data bounds and sum */
/* Count the blocks. */
@@ -864,7 +859,6 @@
struct ifile *ifp;
ino_t new_ino;
int error;
- int new_gen;
CLEANERINFO *cip;
/* Get the head of the freelist. */
@@ -879,7 +873,6 @@
panic("lfs_valloc: inuse inode %d on the free list", new_ino);
LFS_PUT_HEADFREE(fs, cip, cbp, ifp->if_nextfree);
- new_gen = ifp->if_version; /* version was updated by vfree */
brelse(bp, 0);
/* Extend IFILE so that the next lfs_valloc will succeed. */
@@ -1195,7 +1188,6 @@
struct lfs *fs;
int frags;
int error;
- size_t obufsize;
ip = VTOI(vp);
fs = ip->i_lfs;
@@ -1218,7 +1210,6 @@
ip->i_flag |= IN_CHANGE | IN_UPDATE;
if (bpp) {
- obufsize = (*bpp)->b_bufsize;
(*bpp)->b_data = erealloc((*bpp)->b_data, nsize);
(void)memset((*bpp)->b_data + osize, 0, nsize - osize);
}
diff -r 83ff2a8ffd39 -r 8bf2fdb45dca sbin/fsck_lfs/pass6.c
--- a/sbin/fsck_lfs/pass6.c Sat Oct 19 01:09:16 2013 +0000
+++ b/sbin/fsck_lfs/pass6.c Sat Oct 19 01:09:58 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass6.c,v 1.31 2013/06/18 18:18:58 christos Exp $ */
+/* $NetBSD: pass6.c,v 1.32 2013/10/19 01:09:58 christos Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -214,12 +214,10 @@
struct ubuf *bp, *sbp, *cbp;
struct inodesc idesc;
ulfs_daddr_t daddr;
- int obfree;
if (debug)
pwarn("remove ino %d\n", (int)ino);
- obfree = fs->lfs_bfree;
LFS_IENTRY(ifp, fs, ino, bp);
daddr = ifp->if_daddr;
if (daddr > 0) {
@@ -543,7 +541,7 @@
void
pass6(void)
{
- ulfs_daddr_t daddr, ibdaddr, odaddr, lastgood, nextseg, *idaddrp;
+ ulfs_daddr_t daddr, ibdaddr, odaddr, lastgood, *idaddrp;
struct uvnode *vp, *devvp;
CLEANERINFO *cip;
SEGUSE *sup;
@@ -588,7 +586,6 @@
ibbuf = emalloc(fs->lfs_ibsize);
nnewfiles = ndelfiles = nmvfiles = nnewblocks = 0;
daddr = fs->lfs_offset;
- nextseg = fs->lfs_nextseg;
hassuper = 0;
lastserial = 0;
while (daddr != lastgood) {
@@ -628,7 +625,6 @@
fs->lfs_bfree -= lfs_btofsb(fs, fs->lfs_sumsize);
fs->lfs_dmeta += lfs_btofsb(fs, fs->lfs_sumsize);
sbdirty();
- nextseg = sp->ss_next;
if (lfs_sntod(fs, lfs_dtosn(fs, daddr)) == daddr +
hassuper * lfs_btofsb(fs, LFS_SBPAD) &&
lfs_dtosn(fs, daddr) != lfs_dtosn(fs, fs->lfs_offset)) {
diff -r 83ff2a8ffd39 -r 8bf2fdb45dca sbin/fsck_lfs/segwrite.c
--- a/sbin/fsck_lfs/segwrite.c Sat Oct 19 01:09:16 2013 +0000
+++ b/sbin/fsck_lfs/segwrite.c Sat Oct 19 01:09:58 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: segwrite.c,v 1.26 2013/06/18 18:18:58 christos Exp $ */
+/* $NetBSD: segwrite.c,v 1.27 2013/10/19 01:09:58 christos Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -243,7 +243,7 @@
Home |
Main Index |
Thread Index |
Old Index