Adapt to compiling with -Wcast-qual and -Wshadow.

This commit is contained in:
he 2005-06-09 09:24:45 +00:00
parent bdc36c4d9b
commit cc17b14ba8
5 changed files with 31 additions and 31 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vconsole.h,v 1.2 2004/05/08 21:04:07 jmc Exp $ */
/* $NetBSD: vconsole.h,v 1.3 2005/06/09 09:26:06 he Exp $ */
/*
* Copyright (c) 1994,1995 Melvyn Tang-Richardson
@ -152,7 +152,7 @@ struct terminal_emulator {
char *name;
/* Terminal emulation routines */
int (*term_init) __P((struct vconsole *vc));
int (*putstring) __P((char *string, int length, struct vconsole *vc));
int (*putstring) __P((const char *string, int length, struct vconsole *vc));
int (*swapin) __P((struct vconsole *vc));
int (*swapout) __P((struct vconsole *vc));
int (*sleep) __P((struct vconsole *vc));

View File

@ -1,4 +1,4 @@
/* $NetBSD: fd.c,v 1.19 2004/10/28 07:07:35 yamt Exp $ */
/* $NetBSD: fd.c,v 1.20 2005/06/09 09:26:06 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -89,7 +89,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.19 2004/10/28 07:07:35 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.20 2005/06/09 09:26:06 he Exp $");
#include "opt_ddb.h"
@ -207,7 +207,7 @@ struct fd_type {
int rate; /* transfer speed code */
u_char fillbyte; /* format fill byte */
u_char interleave; /* interleave factor (formatting) */
char *name;
const char *name;
};
/* The order of entries in the following table is important -- BEWARE! */
@ -296,7 +296,7 @@ void fd_motor_on __P((void *arg));
int fdcresult __P((struct fdc_softc *fdc));
int out_fdc __P((bus_space_tag_t iot, bus_space_handle_t ioh, u_char x));
void fdcstart __P((struct fdc_softc *fdc));
void fdcstatus __P((struct device *dv, int n, char *s));
void fdcstatus __P((struct device *dv, int n, const char *s));
void fdctimeout __P((void *arg));
void fdcpseudointr __P((void *arg));
int fdcintr __P((void *));
@ -868,7 +868,7 @@ void
fdcstatus(dv, n, s)
struct device *dv;
int n;
char *s;
const char *s;
{
struct fdc_softc *fdc = (void *)dv->dv_parent;
char bits[64];

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbic.c,v 1.8 2003/09/21 15:10:05 matt Exp $ */
/* $NetBSD: sbic.c,v 1.9 2005/06/09 09:26:06 he Exp $ */
/*
* Copyright (c) 2001 Richard Earnshaw
@ -114,7 +114,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: sbic.c,v 1.8 2003/09/21 15:10:05 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbic.c,v 1.9 2005/06/09 09:26:06 he Exp $");
#include <sys/systm.h>
#include <sys/callout.h>
@ -158,7 +158,7 @@ static int sbicpoll (struct sbic_softc *);
static int sbicnextstate (struct sbic_softc *, u_char, u_char);
static int sbicmsgin (struct sbic_softc *);
static int sbicxfin (sbic_regmap_p regs, int, void *);
static int sbicabort (struct sbic_softc *, sbic_regmap_p, char *);
static int sbicabort (struct sbic_softc *, sbic_regmap_p, const char *);
static void sbicxfdone (struct sbic_softc *, sbic_regmap_p, int);
static void sbicerror (struct sbic_softc *, sbic_regmap_p, u_char);
static void sbicreset (struct sbic_softc *);
@ -208,11 +208,11 @@ void sbic_dump_acb (struct sbic_acb *);
#define CSR_TRACE_SIZE 32
#if CSR_TRACE_SIZE
#define CSR_TRACE(w,c,a,x) do { \
int s = splbio(); \
int _s = splbio(); \
csr_trace[csr_traceptr].whr = (w); csr_trace[csr_traceptr].csr = (c); \
csr_trace[csr_traceptr].asr = (a); csr_trace[csr_traceptr].xtn = (x); \
csr_traceptr = (csr_traceptr + 1) & (CSR_TRACE_SIZE - 1); \
splx(s); \
splx(_s); \
} while (0)
int csr_traceptr;
int csr_tracesize = CSR_TRACE_SIZE;
@ -635,7 +635,7 @@ sbicwait(sbic_regmap_p regs, char until, int timeo, int line)
}
static int
sbicabort(struct sbic_softc *dev, sbic_regmap_p regs, char *where)
sbicabort(struct sbic_softc *dev, sbic_regmap_p regs, const char *where)
{
u_char csr, asr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: console.c,v 1.11 2003/07/15 00:24:43 lukem Exp $ */
/* $NetBSD: console.c,v 1.12 2005/06/09 09:24:45 he Exp $ */
/*
* Copyright (c) 1994-1995 Melvyn Tang-Richardson
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.11 2003/07/15 00:24:43 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.12 2005/06/09 09:24:45 he Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -670,7 +670,7 @@ physconioctl(dev, cmd, data, flag, p)
case CONSOLE_BLANKTIME:
{
int time = (*(int *)data);
int blanktime = (*(int *)data);
struct vidc_mode *vm = &((struct vidc_info *)vc->r_data)->mode;
/*
@ -680,18 +680,18 @@ physconioctl(dev, cmd, data, flag, p)
*/
if (vm->frame_rate)
time *= vm->frame_rate;
blanktime *= vm->frame_rate;
else
time *= 70;
blanktime *= 70;
if (time == 0) {
if (blanktime == 0) {
if (vc == vconsole_current)
vconsole_current->BLANK(vconsole_current, BLANK_OFF);
} else {
if (vc == vconsole_current)
vconsole_blankinit = time;
vc->blanktime = time;
if (time < 0)
vconsole_blankinit = blanktime;
vc->blanktime = blanktime;
if (blanktime < 0)
vconsole_current->BLANK(vconsole_current, BLANK_NONE);
}
return 0;
@ -828,7 +828,7 @@ int
physconkbd(key)
int key;
{
char *string;
const char *string;
register struct tty *tp;
int s;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vidcrender.c,v 1.15 2005/04/01 11:59:24 yamt Exp $ */
/* $NetBSD: vidcrender.c,v 1.16 2005/06/09 09:24:45 he Exp $ */
/*
* Copyright (c) 1996 Mark Brinicombe
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vidcrender.c,v 1.15 2005/04/01 11:59:24 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: vidcrender.c,v 1.16 2005/06/09 09:24:45 he Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -1610,20 +1610,20 @@ vidcrender_flash_go(vc)
/* What does this function do ? */
int
vidcrender_flash(vc, flash)
vidcrender_flash(vc, flashit)
struct vconsole *vc;
int flash;
int flashit;
{
flash = flash;
flashit = flashit;
return(0);
}
int
vidcrender_cursorflash(vc, flash)
vidcrender_cursorflash(vc, flashit)
struct vconsole *vc;
int flash;
int flashit;
{
cursor_flash = flash;
cursor_flash = flashit;
return(0);
}