Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/nilfs remove unused variable warnings
details: https://anonhg.NetBSD.org/src/rev/b4faaeeb3d12
branches: trunk
changeset: 790631:b4faaeeb3d12
user: christos <christos%NetBSD.org@localhost>
date: Fri Oct 18 19:57:28 2013 +0000
description:
remove unused variable warnings
diffstat:
sys/fs/nilfs/nilfs.h | 4 ++--
sys/fs/nilfs/nilfs_subr.c | 8 +++-----
sys/fs/nilfs/nilfs_vfsops.c | 8 ++++++--
sys/fs/nilfs/nilfs_vnops.c | 8 +++-----
4 files changed, 14 insertions(+), 14 deletions(-)
diffs (128 lines):
diff -r 4c1fa3f5a068 -r b4faaeeb3d12 sys/fs/nilfs/nilfs.h
--- a/sys/fs/nilfs/nilfs.h Fri Oct 18 19:56:55 2013 +0000
+++ b/sys/fs/nilfs/nilfs.h Fri Oct 18 19:57:28 2013 +0000
@@ -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 @@
/* 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;\
diff -r 4c1fa3f5a068 -r b4faaeeb3d12 sys/fs/nilfs/nilfs_subr.c
--- a/sys/fs/nilfs/nilfs_subr.c Fri Oct 18 19:56:55 2013 +0000
+++ b/sys/fs/nilfs/nilfs_subr.c Fri Oct 18 19:57:28 2013 +0000
@@ -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 @@
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 @@
/* 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);
diff -r 4c1fa3f5a068 -r b4faaeeb3d12 sys/fs/nilfs/nilfs_vfsops.c
--- a/sys/fs/nilfs/nilfs_vfsops.c Fri Oct 18 19:56:55 2013 +0000
+++ b/sys/fs/nilfs/nilfs_vfsops.c Fri Oct 18 19:57:28 2013 +0000
@@ -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 @@
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);
diff -r 4c1fa3f5a068 -r b4faaeeb3d12 sys/fs/nilfs/nilfs_vnops.c
--- a/sys/fs/nilfs/nilfs_vnops.c Fri Oct 18 19:56:55 2013 +0000
+++ b/sys/fs/nilfs/nilfs_vnops.c Fri Oct 18 19:57:28 2013 +0000
@@ -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 @@
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 @@
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)
Home |
Main Index |
Thread Index |
Old Index