Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys kill some -Wunused-but-set-variable warnings
details: https://anonhg.NetBSD.org/src/rev/03576409018f
branches: trunk
changeset: 782674:03576409018f
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Nov 13 20:10:02 2012 +0000
description:
kill some -Wunused-but-set-variable warnings
diffstat:
sys/kern/kern_tc.c | 13 ++++++++++---
sys/rump/librump/rumpkern/lwproc.c | 6 ++----
sys/rump/librump/rumpkern/scheduler.c | 10 ++++------
sys/rump/librump/rumpkern/vm.c | 6 ++----
sys/secmodel/suser/secmodel_suser.c | 6 ++----
5 files changed, 20 insertions(+), 21 deletions(-)
diffs (200 lines):
diff -r cc5ed9882bd6 -r 03576409018f sys/kern/kern_tc.c
--- a/sys/kern/kern_tc.c Tue Nov 13 19:12:42 2012 +0000
+++ b/sys/kern/kern_tc.c Tue Nov 13 20:10:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_tc.c,v 1.43 2012/02/21 15:41:24 martin Exp $ */
+/* $NetBSD: kern_tc.c,v 1.44 2012/11/13 20:10:02 pooka Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
/* __FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $"); */
-__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.43 2012/02/21 15:41:24 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.44 2012/11/13 20:10:02 pooka Exp $");
#ifdef _KERNEL_OPT
#include "opt_ntp.h"
@@ -935,7 +935,10 @@
struct bintime bt;
struct timespec ts, *tsp, *osp;
u_int64_t tcount, *pcount;
- int foff, fhard;
+ int foff;
+#ifdef PPS_SYNC
+ int fhard;
+#endif
pps_seq_t *pseq;
KASSERT(mutex_owned(&timecounter_lock));
@@ -950,14 +953,18 @@
tsp = &pps->ppsinfo.assert_timestamp;
osp = &pps->ppsparam.assert_offset;
foff = pps->ppsparam.mode & PPS_OFFSETASSERT;
+#ifdef PPS_SYNC
fhard = pps->kcmode & PPS_CAPTUREASSERT;
+#endif
pcount = &pps->ppscount[0];
pseq = &pps->ppsinfo.assert_sequence;
} else {
tsp = &pps->ppsinfo.clear_timestamp;
osp = &pps->ppsparam.clear_offset;
foff = pps->ppsparam.mode & PPS_OFFSETCLEAR;
+#ifdef PPS_SYNC
fhard = pps->kcmode & PPS_CAPTURECLEAR;
+#endif
pcount = &pps->ppscount[1];
pseq = &pps->ppsinfo.clear_sequence;
}
diff -r cc5ed9882bd6 -r 03576409018f sys/rump/librump/rumpkern/lwproc.c
--- a/sys/rump/librump/rumpkern/lwproc.c Tue Nov 13 19:12:42 2012 +0000
+++ b/sys/rump/librump/rumpkern/lwproc.c Tue Nov 13 20:10:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwproc.c,v 1.18 2011/05/01 02:52:42 pgoyette Exp $ */
+/* $NetBSD: lwproc.c,v 1.19 2012/11/13 20:10:02 pooka Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.18 2011/05/01 02:52:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.19 2012/11/13 20:10:02 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -179,7 +179,6 @@
lwproc_freelwp(struct lwp *l)
{
struct proc *p;
- bool freeproc;
p = l->l_proc;
mutex_enter(p->p_lock);
@@ -195,7 +194,6 @@
KASSERT(p != &proc0);
p->p_stat = SDEAD;
}
- freeproc = p->p_nlwps == 0;
cv_broadcast(&p->p_lwpcv); /* nobody sleeps on this in rump? */
kauth_cred_free(l->l_cred);
mutex_exit(p->p_lock);
diff -r cc5ed9882bd6 -r 03576409018f sys/rump/librump/rumpkern/scheduler.c
--- a/sys/rump/librump/rumpkern/scheduler.c Tue Nov 13 19:12:42 2012 +0000
+++ b/sys/rump/librump/rumpkern/scheduler.c Tue Nov 13 20:10:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scheduler.c,v 1.29 2012/09/15 17:15:01 pooka Exp $ */
+/* $NetBSD: scheduler.c,v 1.30 2012/11/13 20:10:02 pooka Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.29 2012/09/15 17:15:01 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.30 2012/11/13 20:10:02 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -127,7 +127,6 @@
void
rump_cpus_bootstrap(int *nump)
{
- struct rumpcpu *rcpu;
struct cpu_info *ci;
int num = *nump;
int i;
@@ -139,7 +138,6 @@
}
for (i = 0; i < num; i++) {
- rcpu = &rcpu_storage[i];
ci = &rump_cpus[i];
ci->ci_index = i;
}
@@ -514,14 +512,14 @@
kpreempt_disable(void)
{
- KPREEMPT_DISABLE(curlwp);
+ //KPREEMPT_DISABLE(curlwp);
}
void
kpreempt_enable(void)
{
- KPREEMPT_ENABLE(curlwp);
+ //KPREEMPT_ENABLE(curlwp);
}
void
diff -r cc5ed9882bd6 -r 03576409018f sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c Tue Nov 13 19:12:42 2012 +0000
+++ b/sys/rump/librump/rumpkern/vm.c Tue Nov 13 20:10:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm.c,v 1.130 2012/07/27 09:06:01 pooka Exp $ */
+/* $NetBSD: vm.c,v 1.131 2012/11/13 20:10:02 pooka Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.130 2012/07/27 09:06:01 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.131 2012/11/13 20:10:02 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -1004,7 +1004,6 @@
struct vm_page *pg;
struct pool *pp, *pp_first;
int cleaned, skip, skipped;
- int waspaging;
bool succ;
bool lockrunning;
@@ -1021,7 +1020,6 @@
cv_wait(&pdaemoncv, &pdaemonmtx);
uvmexp.pdwoke++;
- waspaging = uvmexp.paging;
/* tell the world that we are hungry */
kernel_map->flags |= VM_MAP_WANTVA;
diff -r cc5ed9882bd6 -r 03576409018f sys/secmodel/suser/secmodel_suser.c
--- a/sys/secmodel/suser/secmodel_suser.c Tue Nov 13 19:12:42 2012 +0000
+++ b/sys/secmodel/suser/secmodel_suser.c Tue Nov 13 20:10:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_suser.c,v 1.39 2012/03/13 18:41:02 elad Exp $ */
+/* $NetBSD: secmodel_suser.c,v 1.40 2012/11/13 20:10:03 pooka Exp $ */
/*-
* Copyright (c) 2006 Elad Efrat <elad%NetBSD.org@localhost>
* All rights reserved.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.39 2012/03/13 18:41:02 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.40 2012/11/13 20:10:03 pooka Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -467,13 +467,11 @@
secmodel_suser_process_cb(kauth_cred_t cred, kauth_action_t action,
void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
{
- struct proc *p;
bool isroot;
int result;
isroot = suser_isroot(cred);
result = KAUTH_RESULT_DEFER;
- p = arg0;
switch (action) {
case KAUTH_PROCESS_SIGNAL:
Home |
Main Index |
Thread Index |
Old Index