Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/pmax quell cast-qual and shadow warnings
details: https://anonhg.NetBSD.org/src/rev/05e747f0324d
branches: trunk
changeset: 581449:05e747f0324d
user: drochner <drochner%NetBSD.org@localhost>
date: Wed Jun 01 18:21:43 2005 +0000
description:
quell cast-qual and shadow warnings
diffstat:
sys/arch/pmax/dev/bt459.c | 8 ++++----
sys/arch/pmax/dev/bt478.c | 8 ++++----
sys/arch/pmax/dev/dc.c | 8 ++++----
sys/arch/pmax/dev/dtop.c | 16 ++++++++--------
sys/arch/pmax/dev/ims332.c | 8 ++++----
sys/arch/pmax/dev/lk201.c | 17 +++++++++--------
sys/arch/pmax/dev/lk201var.h | 4 ++--
sys/arch/pmax/dev/qvss_compat.c | 6 ++----
sys/arch/pmax/tc/scc.c | 6 +++---
9 files changed, 40 insertions(+), 41 deletions(-)
diffs (truncated from 336 to 300 lines):
diff -r 75d6aa756460 -r 05e747f0324d sys/arch/pmax/dev/bt459.c
--- a/sys/arch/pmax/dev/bt459.c Wed Jun 01 18:18:52 2005 +0000
+++ b/sys/arch/pmax/dev/bt459.c Wed Jun 01 18:21:43 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bt459.c,v 1.23 2003/08/07 16:29:05 agc Exp $ */
+/* $NetBSD: bt459.c,v 1.24 2005/06/01 18:21:43 drochner Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: bt459.c,v 1.23 2003/08/07 16:29:05 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bt459.c,v 1.24 2005/06/01 18:21:43 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -449,7 +449,7 @@
int index, count;
{
bt459_regmap_t *regs;
- u_char *cmap_bits;
+ const u_char *cmap_bits;
u_char *cmap;
int i;
@@ -457,7 +457,7 @@
return EINVAL;
regs = (bt459_regmap_t *)(fi -> fi_vdac);
- cmap_bits = (u_char *)newbits;
+ cmap_bits = newbits;
cmap = (u_char *)(fi -> fi_cmap_bits) + (index * 3);
bt459_select_reg(regs, index);
diff -r 75d6aa756460 -r 05e747f0324d sys/arch/pmax/dev/bt478.c
--- a/sys/arch/pmax/dev/bt478.c Wed Jun 01 18:18:52 2005 +0000
+++ b/sys/arch/pmax/dev/bt478.c Wed Jun 01 18:21:43 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bt478.c,v 1.19 2003/08/07 16:29:06 agc Exp $ */
+/* $NetBSD: bt478.c,v 1.20 2005/06/01 18:21:43 drochner Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -53,7 +53,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bt478.c,v 1.19 2003/08/07 16:29:06 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bt478.c,v 1.20 2005/06/01 18:21:43 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -252,14 +252,14 @@
int index, count;
{
VDACRegs *vdac = (VDACRegs *)(fi -> fi_vdac);
- u_char *cmap_bits;
+ const u_char *cmap_bits;
u_char *cmap;
int i;
if (index < 0 || count < 1 || index + count > 256)
return EINVAL;
- cmap_bits = (u_char *)bits;
+ cmap_bits = bits;
cmap = (u_char *)(fi -> fi_cmap_bits) + index * 3;
for (i = 0; i < count; i++) {
diff -r 75d6aa756460 -r 05e747f0324d sys/arch/pmax/dev/dc.c
--- a/sys/arch/pmax/dev/dc.c Wed Jun 01 18:18:52 2005 +0000
+++ b/sys/arch/pmax/dev/dc.c Wed Jun 01 18:21:43 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dc.c,v 1.78 2004/04/25 06:23:41 matt Exp $ */
+/* $NetBSD: dc.c,v 1.79 2005/06/01 18:21:43 drochner Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dc.c,v 1.78 2004/04/25 06:23:41 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dc.c,v 1.79 2005/06/01 18:21:43 drochner Exp $");
/*
* devDC7085.c --
@@ -307,7 +307,7 @@
/* init pseudo DMA structures */
pdp = &sc->dc_pdma[0];
for (line = 0; line < 4; line++) {
- pdp->p_addr = (void *)dcaddr;
+ pdp->p_addr = addr;
tp = sc->dc_tty[line] = ttymalloc();
if (line != DCKBD_PORT && line != DCMOUSE_PORT)
tty_attach(tp);
@@ -806,7 +806,7 @@
int overrun = 0;
struct tty **dc_tty;
#if NRASTERCONSOLE > 0
- char *cp;
+ const char *cp;
int cl;
#endif
diff -r 75d6aa756460 -r 05e747f0324d sys/arch/pmax/dev/dtop.c
--- a/sys/arch/pmax/dev/dtop.c Wed Jun 01 18:18:52 2005 +0000
+++ b/sys/arch/pmax/dev/dtop.c Wed Jun 01 18:21:43 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dtop.c,v 1.67 2003/08/07 16:29:08 agc Exp $ */
+/* $NetBSD: dtop.c,v 1.68 2005/06/01 18:21:43 drochner Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -90,7 +90,7 @@
********************************************************/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dtop.c,v 1.67 2003/08/07 16:29:08 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtop.c,v 1.68 2005/06/01 18:21:43 drochner Exp $");
#include "opt_ddb.h"
#include "rasterconsole.h"
@@ -629,7 +629,7 @@
{
poll_reg_t poll;
data_reg_t data;
- int max, i, len;
+ int ctr, i, len;
unsigned char c;
int state;
int escaped;
@@ -648,10 +648,10 @@
len = 0; /* packet data length */
i = 0; /* packet data index */
while (1) {
- for (max = 0; (max < DTOP_MAX_POLL) && !DTOP_RX_AVAIL(poll);
- max++)
+ for (ctr = 0; (ctr < DTOP_MAX_POLL) && !DTOP_RX_AVAIL(poll);
+ ctr++)
DELAY(1);
- if (max == DTOP_MAX_POLL) {
+ if (ctr == DTOP_MAX_POLL) {
++dtop->bad_pkts;
return (-1);
}
@@ -860,7 +860,7 @@
u_char *ls, *le, *ns, *ne;
u_char save[11], retc;
int msg_len, c, s, cl;
- char *cp;
+ const char *cp;
#ifdef RCONS_BRAINDAMAGE
struct tty *tp = DTOP_TTY(0);
#endif
@@ -1003,7 +1003,7 @@
{
dtop_device_t dev = (dtop_device_t)arg;
int i, c, cl;
- char *cp;
+ const char *cp;
#if 0
struct tty *tp = DTOP_TTY(0);
#endif
diff -r 75d6aa756460 -r 05e747f0324d sys/arch/pmax/dev/ims332.c
--- a/sys/arch/pmax/dev/ims332.c Wed Jun 01 18:18:52 2005 +0000
+++ b/sys/arch/pmax/dev/ims332.c Wed Jun 01 18:21:43 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ims332.c,v 1.16 2003/10/31 03:32:19 simonb Exp $ */
+/* $NetBSD: ims332.c,v 1.17 2005/06/01 18:21:43 drochner Exp $ */
/*-
* Copyright (c) 1992, 1993, 1995
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: ims332.c,v 1.16 2003/10/31 03:32:19 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ims332.c,v 1.17 2005/06/01 18:21:43 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -227,14 +227,14 @@
const u_char *bits;
int index, count;
{
- u_char *cmap_bits;
+ const u_char *cmap_bits;
u_char *cmap;
int i;
if (index > 256 || index < 0 || index + count > 256)
return EINVAL;
- cmap_bits = (u_char *)bits;
+ cmap_bits = bits;
cmap = (u_char *)(fi -> fi_cmap_bits) + index * 3;
for (i = 0; i < count; i++) {
diff -r 75d6aa756460 -r 05e747f0324d sys/arch/pmax/dev/lk201.c
--- a/sys/arch/pmax/dev/lk201.c Wed Jun 01 18:18:52 2005 +0000
+++ b/sys/arch/pmax/dev/lk201.c Wed Jun 01 18:21:43 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lk201.c,v 1.21 2003/07/15 02:54:39 lukem Exp $ */
+/* $NetBSD: lk201.c,v 1.22 2005/06/01 18:21:43 drochner Exp $ */
/*
* The LK201 keycode mapping routine is here, along with initialization
@@ -6,7 +6,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lk201.c,v 1.21 2003/07/15 02:54:39 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lk201.c,v 1.22 2005/06/01 18:21:43 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -192,7 +192,7 @@
struct {
int ts_keycode;
int ts_len;
- char *ts_string;
+ const char *ts_string;
} static lk_keytostr[] = { /* termcap name */
{ KBD_UP, 3, "\033[A" }, /* ku */
{ KBD_DOWN, 3, "\033[B" }, /* kd */
@@ -254,14 +254,15 @@
* no valid mapping. Return length of mapped ASCII in *len - returned
* string is not NUL terminated, as NUL is a valid code.
*/
-char *
+const char *
lk_mapchar(cc, len)
int cc, *len;
{
static u_char shiftDown, ctrlDown, capsLock;
- static char buf[8], *lastStr;
+ static char buf[8];
+ static const char *lastStr;
static int lastLen;
- char *cp;
+ const char *cp;
int i;
cp = NULL;
@@ -401,7 +402,7 @@
lk_getc(dev)
dev_t dev; /* ignored */
{
- static char *cp;
+ static const char *cp;
static int len;
int c;
@@ -413,7 +414,7 @@
#endif
for (;;) {
if (len != 0) {
- c = *(u_char *)cp++;
+ c = *(const u_char *)cp++;
len--;
break;
}
diff -r 75d6aa756460 -r 05e747f0324d sys/arch/pmax/dev/lk201var.h
--- a/sys/arch/pmax/dev/lk201var.h Wed Jun 01 18:18:52 2005 +0000
+++ b/sys/arch/pmax/dev/lk201var.h Wed Jun 01 18:21:43 2005 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: lk201var.h,v 1.8 2000/01/08 01:02:35 simonb Exp $ */
+/* $NetBSD: lk201var.h,v 1.9 2005/06/01 18:21:43 drochner Exp $ */
#ifndef _LK201VAR_H_
#define _LK201VAR_H_
#ifdef _KERNEL
-char *lk_mapchar __P((int, int *));
+const char *lk_mapchar __P((int, int *));
void lk_reset __P((dev_t, void (*)(dev_t, int)));
void lk_mouseinit __P((dev_t, void (*)(dev_t, int), int (*)(dev_t)));
diff -r 75d6aa756460 -r 05e747f0324d sys/arch/pmax/dev/qvss_compat.c
--- a/sys/arch/pmax/dev/qvss_compat.c Wed Jun 01 18:18:52 2005 +0000
+++ b/sys/arch/pmax/dev/qvss_compat.c Wed Jun 01 18:21:43 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: qvss_compat.c,v 1.35 2003/10/31 03:29:59 simonb Exp $ */
+/* $NetBSD: qvss_compat.c,v 1.36 2005/06/01 18:21:43 drochner Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: qvss_compat.c,v 1.35 2003/10/31 03:29:59 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qvss_compat.c,v 1.36 2005/06/01 18:21:43 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
Home |
Main Index |
Thread Index |
Old Index