Module Name: src Committed By: christos Date: Fri Oct 18 19:57:28 UTC 2013
Modified Files: src/sys/fs/nilfs: nilfs.h nilfs_subr.c nilfs_vfsops.c nilfs_vnops.c Log Message: remove unused variable warnings To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/fs/nilfs/nilfs.h cvs rdiff -u -r1.9 -r1.10 src/sys/fs/nilfs/nilfs_subr.c cvs rdiff -u -r1.11 -r1.12 src/sys/fs/nilfs/nilfs_vfsops.c cvs rdiff -u -r1.23 -r1.24 src/sys/fs/nilfs/nilfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/fs/nilfs/nilfs.h diff -u src/sys/fs/nilfs/nilfs.h:1.3 src/sys/fs/nilfs/nilfs.h:1.4 --- src/sys/fs/nilfs/nilfs.h:1.3 Fri Jul 27 20:43:23 2012 +++ src/sys/fs/nilfs/nilfs.h Fri Oct 18 15:57:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs.h,v 1.3 2012/07/28 00:43:23 matt Exp $ */ +/* $NetBSD: nilfs.h,v 1.4 2013/10/18 19:57:28 christos Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -66,7 +66,7 @@ extern int nilfs_verbose; /* initial value of nilfs_verbose */ #define NILFS_DEBUGGING 0 -#ifdef DEBUG +#ifdef NILFS_DEBUG #define DPRINTF(name, arg) { \ if (nilfs_verbose & NILFS_DEBUG_##name) {\ printf arg;\ Index: src/sys/fs/nilfs/nilfs_subr.c diff -u src/sys/fs/nilfs/nilfs_subr.c:1.9 src/sys/fs/nilfs/nilfs_subr.c:1.10 --- src/sys/fs/nilfs/nilfs_subr.c:1.9 Thu Dec 20 03:03:43 2012 +++ src/sys/fs/nilfs/nilfs_subr.c Fri Oct 18 15:57:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs_subr.c,v 1.9 2012/12/20 08:03:43 hannken Exp $ */ +/* $NetBSD: nilfs_subr.c,v 1.10 2013/10/18 19:57:28 christos Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -28,7 +28,7 @@ #include <sys/cdefs.h> #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: nilfs_subr.c,v 1.9 2012/12/20 08:03:43 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nilfs_subr.c,v 1.10 2013/10/18 19:57:28 christos Exp $"); #endif /* not lint */ #include <sys/param.h> @@ -725,7 +725,6 @@ static void nilfs_register_node(struct nilfs_node *node) { struct nilfs_mount *ump; - struct nilfs_node *chk; uint32_t hashline; ump = node->ump; @@ -734,13 +733,12 @@ nilfs_register_node(struct nilfs_node *n /* add to our hash table */ hashline = nilfs_calchash(node->ino) & NILFS_INODE_HASHMASK; #ifdef DEBUG + struct nilfs_node *chk; LIST_FOREACH(chk, &ump->nilfs_nodes[hashline], hashchain) { assert(chk); if (chk->ino == node->ino) panic("Double node entered\n"); } -#else - chk = NULL; #endif LIST_INSERT_HEAD(&ump->nilfs_nodes[hashline], node, hashchain); Index: src/sys/fs/nilfs/nilfs_vfsops.c diff -u src/sys/fs/nilfs/nilfs_vfsops.c:1.11 src/sys/fs/nilfs/nilfs_vfsops.c:1.12 --- src/sys/fs/nilfs/nilfs_vfsops.c:1.11 Mon Sep 30 14:57:59 2013 +++ src/sys/fs/nilfs/nilfs_vfsops.c Fri Oct 18 15:57:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs_vfsops.c,v 1.11 2013/09/30 18:57:59 hannken Exp $ */ +/* $NetBSD: nilfs_vfsops.c,v 1.12 2013/10/18 19:57:28 christos Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -28,7 +28,7 @@ #include <sys/cdefs.h> #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.11 2013/09/30 18:57:59 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.12 2013/10/18 19:57:28 christos Exp $"); #endif /* not lint */ @@ -693,6 +693,10 @@ nilfs_mount_checkpoint(struct nilfs_moun DPRINTF(VOLUMES, ("mount_nilfs: checkpoint header read in\n")); DPRINTF(VOLUMES, ("\tNumber of checkpoints %"PRIu64"\n", ncp)); DPRINTF(VOLUMES, ("\tNumber of snapshots %"PRIu64"\n", nsn)); +#ifndef NILFS_DEBUG + __USE(ncp); + __USE(nsn); +#endif /* read in our specified checkpoint */ dlen = nilfs_rw16(ump->nilfsdev->super.s_checkpoint_size); Index: src/sys/fs/nilfs/nilfs_vnops.c diff -u src/sys/fs/nilfs/nilfs_vnops.c:1.23 src/sys/fs/nilfs/nilfs_vnops.c:1.24 --- src/sys/fs/nilfs/nilfs_vnops.c:1.23 Wed May 8 06:39:17 2013 +++ src/sys/fs/nilfs/nilfs_vnops.c Fri Oct 18 15:57:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs_vnops.c,v 1.23 2013/05/08 10:39:17 reinoud Exp $ */ +/* $NetBSD: nilfs_vnops.c,v 1.24 2013/10/18 19:57:28 christos Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -28,7 +28,7 @@ #include <sys/cdefs.h> #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: nilfs_vnops.c,v 1.23 2013/05/08 10:39:17 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nilfs_vnops.c,v 1.24 2013/10/18 19:57:28 christos Exp $"); #endif /* not lint */ @@ -212,7 +212,7 @@ nilfs_write(void *v) int advice = IO_ADV_DECODE(ap->a_ioflag); struct uvm_object *uobj; struct nilfs_node *nilfs_node = VTOI(vp); - uint64_t file_size, old_size; + uint64_t file_size; vsize_t len; int error, resid, extended; @@ -235,12 +235,10 @@ nilfs_write(void *v) assert(nilfs_node); panic("nilfs_write() called\n"); -return EIO; /* remember old file size */ assert(nilfs_node); file_size = nilfs_rw64(nilfs_node->inode.i_size); - old_size = file_size; /* if explicitly asked to append, uio_offset can be wrong? */ if (ioflag & IO_APPEND)