Appease the -Wshadow and -Wcast-qual gods.

This commit is contained in:
scw 2005-06-03 11:54:48 +00:00
parent 8927cebf86
commit e8dd39d847
2 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.11 2005/01/19 00:26:54 simonb Exp $ */
/* $NetBSD: clock.c,v 1.12 2005/06/03 11:54:48 scw Exp $ */
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
/*
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.11 2005/01/19 00:26:54 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.12 2005/06/03 11:54:48 scw Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -82,7 +82,7 @@ void
decr_intr(struct clockframe *frame)
{
int pri;
long tick, xticks;
long tbtick, xticks;
int nticks;
extern u_long intrcnt[];
/*
@ -91,16 +91,16 @@ decr_intr(struct clockframe *frame)
if (!ticks_per_intr)
return;
tick = mftbl();
tbtick = mftbl();
mtspr(SPR_TSR, TSR_PIS); /* Clear TSR[PIS] */
/*
* lasttb is used during microtime. Set it to the virtual
* start of this tick interval.
*/
xticks = tick - lasttb; /* Number of TLB cycles since last exception */
xticks = tbtick - lasttb; /* Number of TLB cycles since last exception */
for (nticks = 0; xticks > ticks_per_intr; nticks++)
xticks -= ticks_per_intr;
lasttb = tick - xticks;
lasttb = tbtick - xticks;
intrcnt[CNT_CLOCK]++;
pri = splclock();

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.25 2005/02/25 07:09:58 simonb Exp $ */
/* $NetBSD: trap.c,v 1.26 2005/06/03 11:54:48 scw Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.25 2005/02/25 07:09:58 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.26 2005/06/03 11:54:48 scw Exp $");
#include "opt_altivec.h"
#include "opt_ddb.h"
@ -398,7 +398,7 @@ ctx_setup(int ctx, int srr1)
if (srr1 & PSL_PR) {
pm = curproc->p_vmspace->vm_map.pmap;
if (!pm->pm_ctx) {
ctx_alloc((struct pmap *)pm);
ctx_alloc(__UNVOLATILE(pm));
}
ctx = pm->pm_ctx;
if (srr1 & PSL_SE) {
@ -496,7 +496,7 @@ bigcopyin(const void *udaddr, void *kaddr, size_t len)
* Stolen from physio():
*/
PHOLD(l);
error = uvm_vslock(p, (caddr_t)udaddr, len, VM_PROT_READ);
error = uvm_vslock(p, __UNCONST(udaddr), len, VM_PROT_READ);
if (error) {
PRELE(l);
return EFAULT;
@ -505,7 +505,7 @@ bigcopyin(const void *udaddr, void *kaddr, size_t len)
memcpy(kp, up, len);
vunmaprange((vaddr_t)up, len);
uvm_vsunlock(p, (caddr_t)udaddr, len);
uvm_vsunlock(p, __UNCONST(udaddr), len);
PRELE(l);
return 0;
@ -562,7 +562,7 @@ static int
bigcopyout(const void *kaddr, void *udaddr, size_t len)
{
char *up;
const char *kp = (char *)kaddr;
const char *kp = (const char *)kaddr;
struct lwp *l = curlwp;
struct proc *p;
int error;