Fix variable shadowing and adapt to -Wconst-qual.
This commit is contained in:
parent
0a045d64d9
commit
f4c319d531
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: isa_machdep.c,v 1.6 2003/08/07 16:29:22 agc Exp $ */
|
||||
/* $NetBSD: isa_machdep.c,v 1.7 2005/06/02 14:11:19 he Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -71,7 +71,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.6 2003/08/07 16:29:22 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.7 2005/06/02 14:11:19 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -280,13 +280,13 @@ isa_intr_disestablish(ic, arg)
|
|||
void *arg;
|
||||
{
|
||||
struct intrhand *ih = arg;
|
||||
int irq = ih->ih_irq, cpl;
|
||||
int irq = ih->ih_irq, s;
|
||||
struct intrhand **p, *q;
|
||||
|
||||
if (irq < 0 || irq > 15)
|
||||
panic("intr_disestablish: bogus irq");
|
||||
|
||||
cpl = splhigh();
|
||||
s = splhigh();
|
||||
for (p = &isa_intrhand[irq]; (q = *p) != NULL && q != ih;
|
||||
p = &q->ih_next)
|
||||
;
|
||||
|
@ -301,7 +301,7 @@ isa_intr_disestablish(ic, arg)
|
|||
if (isa_intrhand[irq] == NULL) {
|
||||
isa_intrtype[irq] = IST_NONE;
|
||||
}
|
||||
splx(cpl);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
#define SUPERIO_CONF_IDX 0x15C
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: isaclock.c,v 1.4 2003/08/07 16:29:22 agc Exp $ */
|
||||
/* $NetBSD: isaclock.c,v 1.5 2005/06/02 14:11:19 he Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -121,7 +121,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.4 2003/08/07 16:29:22 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.5 2005/06/02 14:11:19 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -295,7 +295,7 @@ inittodr(base)
|
|||
{
|
||||
mc_todregs rtclk;
|
||||
time_t n;
|
||||
int sec, min, hr, dom, mon, yr;
|
||||
int sec, mins, hr, dom, mon, yr;
|
||||
int i, days = 0;
|
||||
int s;
|
||||
|
||||
|
@ -322,14 +322,14 @@ inittodr(base)
|
|||
splx(s);
|
||||
|
||||
sec = hexdectodec(rtclk[MC_SEC]);
|
||||
min = hexdectodec(rtclk[MC_MIN]);
|
||||
mins = hexdectodec(rtclk[MC_MIN]);
|
||||
hr = hexdectodec(rtclk[MC_HOUR]);
|
||||
dom = hexdectodec(rtclk[MC_DOM]);
|
||||
mon = hexdectodec(rtclk[MC_MONTH]);
|
||||
yr = hexdectodec(rtclk[MC_YEAR]);
|
||||
yr = (yr < 70) ? yr+100 : yr;
|
||||
|
||||
n = sec + 60 * min + 3600 * hr;
|
||||
n = sec + 60 * mins + 3600 * hr;
|
||||
n += (dom - 1) * 3600 * 24;
|
||||
|
||||
if (yeartoday(yr) == 366)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clock.c,v 1.6 2004/06/29 12:01:11 kleink Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.7 2005/06/02 14:11:19 he 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.6 2004/06/29 12:01:11 kleink Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.7 2005/06/02 14:11:19 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -59,7 +59,7 @@ decr_intr(frame)
|
|||
int msr;
|
||||
int pri;
|
||||
u_long tb;
|
||||
long tick;
|
||||
long ticks;
|
||||
int nticks;
|
||||
extern long intrcnt[];
|
||||
|
||||
|
@ -73,16 +73,16 @@ decr_intr(frame)
|
|||
* Based on the actual time delay since the last decrementer reload,
|
||||
* we arrange for earlier interrupt next time.
|
||||
*/
|
||||
asm ("mftb %0; mfdec %1" : "=r"(tb), "=r"(tick));
|
||||
for (nticks = 0; tick < 0; nticks++)
|
||||
tick += ticks_per_intr;
|
||||
asm volatile ("mtdec %0" :: "r"(tick));
|
||||
asm ("mftb %0; mfdec %1" : "=r"(tb), "=r"(ticks));
|
||||
for (nticks = 0; ticks < 0; nticks++)
|
||||
ticks += ticks_per_intr;
|
||||
asm volatile ("mtdec %0" :: "r"(ticks));
|
||||
|
||||
/*
|
||||
* lasttb is used during microtime. Set it to the virtual
|
||||
* start of this tick interval.
|
||||
*/
|
||||
lasttb = tb + tick - ticks_per_intr;
|
||||
lasttb = tb + ticks - ticks_per_intr;
|
||||
|
||||
intrcnt[CNT_CLOCK]++;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: disksubr.c,v 1.9 2003/10/08 04:25:46 lukem Exp $ */
|
||||
/* $NetBSD: disksubr.c,v 1.10 2005/06/02 14:11:19 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.9 2003/10/08 04:25:46 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.10 2005/06/02 14:11:19 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -136,7 +136,7 @@ readdisklabel(dev, strat, lp, osdep)
|
|||
struct dkbad *bdp;
|
||||
struct buf *bp;
|
||||
struct disklabel *dlp;
|
||||
char *msg = NULL;
|
||||
const char *msg = NULL;
|
||||
int dospartoff, cyl, i, *ip;
|
||||
|
||||
/* minimal requirements for archtypal disk label */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extintr.c,v 1.8 2004/02/13 11:36:17 wiz Exp $ */
|
||||
/* $NetBSD: extintr.c,v 1.9 2005/06/02 14:11:19 he Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -73,7 +73,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.8 2004/02/13 11:36:17 wiz Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.9 2005/06/02 14:11:19 he Exp $");
|
||||
|
||||
#include "opt_openpic.h"
|
||||
|
||||
|
@ -107,7 +107,7 @@ struct intrhand *intrhand[ICU_LEN];
|
|||
void intr_calculatemasks __P((void));
|
||||
int fakeintr __P((void *));
|
||||
void ext_intr __P((void));
|
||||
char *intr_typename __P((int));
|
||||
const char *intr_typename __P((int));
|
||||
|
||||
int
|
||||
fakeintr(arg)
|
||||
|
@ -162,7 +162,7 @@ out:
|
|||
splx(pcpl);/* Will also process pendings if necessary */
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
intr_typename(type)
|
||||
int type;
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue