Appease -Wshadow and -Wcast-qual
This commit is contained in:
parent
861b1ff2f6
commit
7e5638e54e
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: pccons.c,v 1.20 2005/01/05 10:25:43 tsutsui Exp $ */
|
/* $NetBSD: pccons.c,v 1.21 2005/06/03 13:14:09 scw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 1997
|
* Copyright 1997
|
||||||
@ -135,7 +135,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.20 2005/01/05 10:25:43 tsutsui Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.21 2005/06/03 13:14:09 scw Exp $");
|
||||||
|
|
||||||
#include "opt_ddb.h"
|
#include "opt_ddb.h"
|
||||||
#include "opt_xserver.h"
|
#include "opt_xserver.h"
|
||||||
@ -311,7 +311,7 @@ void pcattach __P((struct device *,
|
|||||||
int pcintr __P((void *));
|
int pcintr __P((void *));
|
||||||
char *sget __P((struct pc_softc *));
|
char *sget __P((struct pc_softc *));
|
||||||
void sput __P((struct pc_softc *,
|
void sput __P((struct pc_softc *,
|
||||||
u_char *,
|
const u_char *,
|
||||||
int,
|
int,
|
||||||
u_char));
|
u_char));
|
||||||
void pcstart __P((struct tty *));
|
void pcstart __P((struct tty *));
|
||||||
@ -2378,10 +2378,10 @@ pcparam(struct tty *tp,
|
|||||||
*/
|
*/
|
||||||
#define wrtchar(sc, c, at) \
|
#define wrtchar(sc, c, at) \
|
||||||
do { \
|
do { \
|
||||||
char *cp = (char *)crtat; \
|
char *__cp = (char *)crtat; \
|
||||||
\
|
\
|
||||||
*cp++ = (c); \
|
*__cp++ = (c); \
|
||||||
*cp = (at); \
|
*__cp = (at); \
|
||||||
crtat++; sc->vs.col++; \
|
crtat++; sc->vs.col++; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
@ -2427,7 +2427,7 @@ static char bgansitopc[] = {
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
sput(struct pc_softc *sc,
|
sput(struct pc_softc *sc,
|
||||||
u_char *cp,
|
const u_char *cp,
|
||||||
int n,
|
int n,
|
||||||
u_char nowait)
|
u_char nowait)
|
||||||
{
|
{
|
||||||
@ -2439,7 +2439,7 @@ sput(struct pc_softc *sc,
|
|||||||
/* Initialise the display if not done already */
|
/* Initialise the display if not done already */
|
||||||
if (crtat == 0)
|
if (crtat == 0)
|
||||||
{
|
{
|
||||||
u_short volatile *cp;
|
u_short volatile *cp2;
|
||||||
#ifdef DOESNT_ALWAYS_DO_THE_RIGHT_THING
|
#ifdef DOESNT_ALWAYS_DO_THE_RIGHT_THING
|
||||||
u_short was;
|
u_short was;
|
||||||
#endif
|
#endif
|
||||||
@ -2453,19 +2453,19 @@ sput(struct pc_softc *sc,
|
|||||||
** we operate in color mode otherwise
|
** we operate in color mode otherwise
|
||||||
** mono.
|
** mono.
|
||||||
*/
|
*/
|
||||||
cp = (void *)((u_long)(CGA_BUF) + vam_mem_data);
|
cp2 = (void *)((u_long)(CGA_BUF) + vam_mem_data);
|
||||||
#ifdef DOESNT_ALWAYS_DO_THE_RIGHT_THING
|
#ifdef DOESNT_ALWAYS_DO_THE_RIGHT_THING
|
||||||
was = *cp; /* save whatever is at CGA_BUF */
|
was = *cp2; /* save whatever is at CGA_BUF */
|
||||||
*cp = (u_short) 0xA55A;
|
*cp2 = (u_short) 0xA55A;
|
||||||
if (*cp != 0xA55A)
|
if (*cp2 != 0xA55A)
|
||||||
{
|
{
|
||||||
cp = (void *)((u_long)(MONO_BUF) + vam_mem_data);
|
cp2 = (void *)((u_long)(MONO_BUF) + vam_mem_data);
|
||||||
addr_6845 = MONO_BASE;
|
addr_6845 = MONO_BASE;
|
||||||
sc->vs.color = 0;
|
sc->vs.color = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*cp = was; /* restore previous contents of CGA_BUF */
|
*cp2 = was; /* restore previous contents of CGA_BUF */
|
||||||
addr_6845 = CGA_BASE;
|
addr_6845 = CGA_BASE;
|
||||||
sc->vs.color = 1;
|
sc->vs.color = 1;
|
||||||
}
|
}
|
||||||
@ -2484,8 +2484,8 @@ sput(struct pc_softc *sc,
|
|||||||
cursor_shape = 0x0012;
|
cursor_shape = 0x0012;
|
||||||
#endif
|
#endif
|
||||||
/* Save cursor locations */
|
/* Save cursor locations */
|
||||||
Crtat = (u_short *)cp;
|
Crtat = __UNVOLATILE(cp2);
|
||||||
crtat = (u_short *)(cp + cursorat);
|
crtat = __UNVOLATILE(cp2 + cursorat);
|
||||||
|
|
||||||
/* Set up screen size and colours */
|
/* Set up screen size and colours */
|
||||||
sc->vs.ncol = COL;
|
sc->vs.ncol = COL;
|
||||||
|
Loading…
Reference in New Issue
Block a user