Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Adapt to shadowing and qualifier-cast warnings.
details: https://anonhg.NetBSD.org/src/rev/0df1793fdf10
branches: trunk
changeset: 581579:0df1793fdf10
user: he <he%NetBSD.org@localhost>
date: Thu Jun 02 17:45:59 2005 +0000
description:
Adapt to shadowing and qualifier-cast warnings.
diffstat:
sys/arch/arm/arm/bootconfig.c | 6 +-
sys/arch/arm/arm/cpufunc.c | 6 +-
sys/arch/arm/arm/disassem.c | 10 ++--
sys/arch/arm/arm/disksubr.c | 6 +-
sys/arch/arm/arm/disksubr_acorn.c | 6 +-
sys/arch/arm/arm/disksubr_mbr.c | 6 +-
sys/arch/arm/arm32/db_interface.c | 46 ++++++++++++------------
sys/arch/arm/footbridge/footbridge_clock.c | 22 +++++-----
sys/arch/arm/footbridge/footbridge_irqhandler.c | 6 +-
sys/arch/arm/footbridge/footbridge_irqhandler.h | 4 +-
sys/arch/arm/footbridge/footbridgevar.h | 4 +-
sys/arch/arm/footbridge/todclock.c | 10 ++--
sys/arch/arm/include/bootconfig.h | 4 +-
sys/arch/arm/include/disklabel.h | 4 +-
sys/arch/netwinder/include/bootconfig.h | 4 +-
sys/arch/netwinder/netwinder/netwinder_machdep.c | 6 +-
sys/sys/disklabel_acorn.h | 5 +-
17 files changed, 78 insertions(+), 77 deletions(-)
diffs (truncated from 554 to 300 lines):
diff -r 1f482082267a -r 0df1793fdf10 sys/arch/arm/arm/bootconfig.c
--- a/sys/arch/arm/arm/bootconfig.c Thu Jun 02 17:15:10 2005 +0000
+++ b/sys/arch/arm/arm/bootconfig.c Thu Jun 02 17:45:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bootconfig.c,v 1.2 2002/03/10 19:56:39 lukem Exp $ */
+/* $NetBSD: bootconfig.c,v 1.3 2005/06/02 17:45:59 he Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -38,7 +38,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: bootconfig.c,v 1.2 2002/03/10 19:56:39 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bootconfig.c,v 1.3 2005/06/02 17:45:59 he Exp $");
#include <sys/systm.h>
@@ -55,7 +55,7 @@
int
get_bootconf_option(opts, opt, type, result)
char *opts;
- char *opt;
+ const char *opt;
int type;
void *result;
{
diff -r 1f482082267a -r 0df1793fdf10 sys/arch/arm/arm/cpufunc.c
--- a/sys/arch/arm/arm/cpufunc.c Thu Jun 02 17:15:10 2005 +0000
+++ b/sys/arch/arm/arm/cpufunc.c Thu Jun 02 17:45:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufunc.c,v 1.69 2005/05/10 12:59:22 rearnsha Exp $ */
+/* $NetBSD: cpufunc.c,v 1.70 2005/06/02 17:45:59 he Exp $ */
/*
* arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.69 2005/05/10 12:59:22 rearnsha Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.70 2005/06/02 17:45:59 he Exp $");
#include "opt_compat_netbsd.h"
#include "opt_cpuoptions.h"
@@ -1550,7 +1550,7 @@
#define BIC 2
struct cpu_option {
- char *co_name;
+ const char *co_name;
int co_falseop;
int co_trueop;
int co_value;
diff -r 1f482082267a -r 0df1793fdf10 sys/arch/arm/arm/disassem.c
--- a/sys/arch/arm/arm/disassem.c Thu Jun 02 17:15:10 2005 +0000
+++ b/sys/arch/arm/arm/disassem.c Thu Jun 02 17:45:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disassem.c,v 1.15 2004/08/21 12:05:41 rearnsha Exp $ */
+/* $NetBSD: disassem.c,v 1.16 2005/06/02 17:45:59 he Exp $ */
/*
* Copyright (c) 1996 Mark Brinicombe.
@@ -49,7 +49,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.15 2004/08/21 12:05:41 rearnsha Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.16 2005/06/02 17:45:59 he Exp $");
#include <sys/systm.h>
#include <arch/arm/arm/disassem.h>
@@ -102,8 +102,8 @@
struct arm32_insn {
u_int mask;
u_int pattern;
- char* name;
- char* format;
+ const char* name;
+ const char* format;
};
static const struct arm32_insn arm32_i[] = {
@@ -279,7 +279,7 @@
u_int insn;
int matchp;
int branch;
- char* f_ptr;
+ const char* f_ptr;
int fmt;
if (loc & 3) {
diff -r 1f482082267a -r 0df1793fdf10 sys/arch/arm/arm/disksubr.c
--- a/sys/arch/arm/arm/disksubr.c Thu Jun 02 17:15:10 2005 +0000
+++ b/sys/arch/arm/arm/disksubr.c Thu Jun 02 17:45:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.12 2004/09/26 11:57:53 chris Exp $ */
+/* $NetBSD: disksubr.c,v 1.13 2005/06/02 17:45:59 he Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.12 2004/09/26 11:57:53 chris Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.13 2005/06/02 17:45:59 he Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -133,7 +133,7 @@
{
struct buf *bp;
struct disklabel *dlp;
- char *msg = NULL;
+ const char *msg = NULL;
int cyl, netbsdpartoff, i, found = 0;
/* minimal requirements for archtypal disk label */
diff -r 1f482082267a -r 0df1793fdf10 sys/arch/arm/arm/disksubr_acorn.c
--- a/sys/arch/arm/arm/disksubr_acorn.c Thu Jun 02 17:15:10 2005 +0000
+++ b/sys/arch/arm/arm/disksubr_acorn.c Thu Jun 02 17:45:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr_acorn.c,v 1.3 2003/08/07 16:26:51 agc Exp $ */
+/* $NetBSD: disksubr_acorn.c,v 1.4 2005/06/02 17:45:59 he Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr_acorn.c,v 1.3 2003/08/07 16:26:51 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr_acorn.c,v 1.4 2005/06/02 17:45:59 he Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -182,7 +182,7 @@
void (*strat) __P((struct buf *));
struct disklabel *lp;
struct cpu_disklabel *osdep;
- char **msgp;
+ const char **msgp;
int *cylp, *netbsd_label_offp;
{
struct filecore_bootblock *bb;
diff -r 1f482082267a -r 0df1793fdf10 sys/arch/arm/arm/disksubr_mbr.c
--- a/sys/arch/arm/arm/disksubr_mbr.c Thu Jun 02 17:15:10 2005 +0000
+++ b/sys/arch/arm/arm/disksubr_mbr.c Thu Jun 02 17:45:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr_mbr.c,v 1.5 2004/11/03 12:21:04 scw Exp $ */
+/* $NetBSD: disksubr_mbr.c,v 1.6 2005/06/02 17:45:59 he Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr_mbr.c,v 1.5 2004/11/03 12:21:04 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr_mbr.c,v 1.6 2005/06/02 17:45:59 he Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -93,7 +93,7 @@
void (*strat) __P((struct buf *));
struct disklabel *lp;
struct cpu_disklabel *osdep;
- char **msgp;
+ const char **msgp;
int *cylp, *netbsd_label_offp;
{
struct mbr_partition *mbrp;
diff -r 1f482082267a -r 0df1793fdf10 sys/arch/arm/arm32/db_interface.c
--- a/sys/arch/arm/arm32/db_interface.c Thu Jun 02 17:15:10 2005 +0000
+++ b/sys/arch/arm/arm32/db_interface.c Thu Jun 02 17:45:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.35 2004/08/07 11:45:41 rearnsha Exp $ */
+/* $NetBSD: db_interface.c,v 1.36 2005/06/02 17:45:59 he Exp $ */
/*
* Copyright (c) 1996 Scott K. Stevens
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.35 2004/08/07 11:45:41 rearnsha Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.36 2005/06/02 17:45:59 he Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -405,49 +405,49 @@
#endif
u_int
-db_fetch_reg(int reg, db_regs_t *db_regs)
+db_fetch_reg(int reg, db_regs_t *regs)
{
switch (reg) {
case 0:
- return (db_regs->tf_r0);
+ return (regs->tf_r0);
case 1:
- return (db_regs->tf_r1);
+ return (regs->tf_r1);
case 2:
- return (db_regs->tf_r2);
+ return (regs->tf_r2);
case 3:
- return (db_regs->tf_r3);
+ return (regs->tf_r3);
case 4:
- return (db_regs->tf_r4);
+ return (regs->tf_r4);
case 5:
- return (db_regs->tf_r5);
+ return (regs->tf_r5);
case 6:
- return (db_regs->tf_r6);
+ return (regs->tf_r6);
case 7:
- return (db_regs->tf_r7);
+ return (regs->tf_r7);
case 8:
- return (db_regs->tf_r8);
+ return (regs->tf_r8);
case 9:
- return (db_regs->tf_r9);
+ return (regs->tf_r9);
case 10:
- return (db_regs->tf_r10);
+ return (regs->tf_r10);
case 11:
- return (db_regs->tf_r11);
+ return (regs->tf_r11);
case 12:
- return (db_regs->tf_r12);
+ return (regs->tf_r12);
case 13:
- return (db_regs->tf_svc_sp);
+ return (regs->tf_svc_sp);
case 14:
- return (db_regs->tf_svc_lr);
+ return (regs->tf_svc_lr);
case 15:
- return (db_regs->tf_pc);
+ return (regs->tf_pc);
default:
panic("db_fetch_reg: botch");
}
}
u_int
-branch_taken(u_int insn, u_int pc, db_regs_t *db_regs)
+branch_taken(u_int insn, u_int pc, db_regs_t *regs)
{
u_int addr, nregs;
@@ -459,16 +459,16 @@
addr |= 0xfc000000;
return (pc + 8 + addr);
case 0x7: /* ldr pc, [pc, reg, lsl #2] */
- addr = db_fetch_reg(insn & 0xf, db_regs);
+ addr = db_fetch_reg(insn & 0xf, regs);
addr = pc + 8 + (addr << 2);
db_read_bytes(addr, 4, (char *)&addr);
return (addr);
case 0x1: /* mov pc, reg */
- addr = db_fetch_reg(insn & 0xf, db_regs);
+ addr = db_fetch_reg(insn & 0xf, regs);
return (addr);
case 0x8: /* ldmxx reg, {..., pc} */
case 0x9:
- addr = db_fetch_reg((insn >> 16) & 0xf, db_regs);
+ addr = db_fetch_reg((insn >> 16) & 0xf, regs);
nregs = (insn & 0x5555) + ((insn >> 1) & 0x5555);
nregs = (nregs & 0x3333) + ((nregs >> 2) & 0x3333);
nregs = (nregs + (nregs >> 4)) & 0x0f0f;
diff -r 1f482082267a -r 0df1793fdf10 sys/arch/arm/footbridge/footbridge_clock.c
--- a/sys/arch/arm/footbridge/footbridge_clock.c Thu Jun 02 17:15:10 2005 +0000
+++ b/sys/arch/arm/footbridge/footbridge_clock.c Thu Jun 02 17:45:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: footbridge_clock.c,v 1.18 2003/10/05 19:44:58 matt Exp $ */
+/* $NetBSD: footbridge_clock.c,v 1.19 2005/06/02 17:45:59 he Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: footbridge_clock.c,v 1.18 2003/10/05 19:44:58 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: footbridge_clock.c,v 1.19 2005/06/02 17:45:59 he Exp $");
/* Include header files */
@@ -205,14 +205,14 @@
}
Home |
Main Index |
Thread Index |
Old Index