Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hp300/dev Make fbmem volatile to appease gcc -Wcast...
details: https://anonhg.NetBSD.org/src/rev/255a126f292c
branches: trunk
changeset: 581623:255a126f292c
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Jun 03 11:52:50 2005 +0000
description:
Make fbmem volatile to appease gcc -Wcast-qual.
diffstat:
sys/arch/hp300/dev/grf_hy.c | 9 +++++----
sys/arch/hp300/dev/ite_subr.c | 12 ++++++------
sys/arch/hp300/dev/itevar.h | 6 +++---
3 files changed, 14 insertions(+), 13 deletions(-)
diffs (106 lines):
diff -r 7412d219c111 -r 255a126f292c sys/arch/hp300/dev/grf_hy.c
--- a/sys/arch/hp300/dev/grf_hy.c Fri Jun 03 11:51:16 2005 +0000
+++ b/sys/arch/hp300/dev/grf_hy.c Fri Jun 03 11:52:50 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_hy.c,v 1.24 2005/01/02 12:03:12 tsutsui Exp $ */
+/* $NetBSD: grf_hy.c,v 1.25 2005/06/03 11:52:50 tsutsui Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -120,7 +120,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_hy.c,v 1.24 2005/01/02 12:03:12 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_hy.c,v 1.25 2005/06/03 11:52:50 tsutsui Exp $");
#include "opt_compat_hpux.h"
@@ -417,7 +417,8 @@
static void
hyper_ite_fontinit(struct ite_data *ip)
{
- u_char *fbmem, *dp;
+ volatile u_char *fbmem;
+ u_char *dp;
int c, l, b;
int stride, width;
@@ -427,7 +428,7 @@
width = (ip->ftwidth + 7) / 8;
for (c = 0; c < 128; c++) {
- fbmem = (u_char *) FBBASE +
+ fbmem = FBBASE +
(ip->fonty + (c / ip->cpl) * ip->ftheight) *
stride;
fbmem += (ip->fontx >> 3) + (c % ip->cpl) * width;
diff -r 7412d219c111 -r 255a126f292c sys/arch/hp300/dev/ite_subr.c
--- a/sys/arch/hp300/dev/ite_subr.c Fri Jun 03 11:51:16 2005 +0000
+++ b/sys/arch/hp300/dev/ite_subr.c Fri Jun 03 11:52:50 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_subr.c,v 1.12 2004/08/28 17:37:01 thorpej Exp $ */
+/* $NetBSD: ite_subr.c,v 1.13 2005/06/03 11:52:50 tsutsui Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ite_subr.c,v 1.12 2004/08/28 17:37:01 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite_subr.c,v 1.13 2005/06/03 11:52:50 tsutsui Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -130,13 +130,13 @@
int bytewidth = (((ip->ftwidth - 1) / 8) + 1);
int glyphsize = bytewidth * ip->ftheight;
u_char fontbuf[500]; /* XXX malloc not initialize yet */
- u_char *dp, *fbmem;
+ u_char *dp;
+ volatile u_char *fbmem;
int c, i, romp;
romp = getword(ip, getword(ip, FONTROM) + FONTADDR) + FONTDATA;
for (c = 0; c < 128; c++) {
- fbmem = (u_char *)
- (FBBASE +
+ fbmem = (FBBASE +
(ip->fonty + (c / ip->cpl) * ip->ftheight) * ip->fbwidth +
(ip->fontx + (c % ip->cpl) * ip->ftwidth));
dp = fontbuf;
@@ -158,7 +158,7 @@
}
void
-ite_writeglyph(struct ite_data *ip, u_char *fbmem, u_char *glyphp)
+ite_writeglyph(struct ite_data *ip, volatile u_char *fbmem, u_char *glyphp)
{
int bn;
int l, b;
diff -r 7412d219c111 -r 255a126f292c sys/arch/hp300/dev/itevar.h
--- a/sys/arch/hp300/dev/itevar.h Fri Jun 03 11:51:16 2005 +0000
+++ b/sys/arch/hp300/dev/itevar.h Fri Jun 03 11:52:50 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: itevar.h,v 1.20 2004/08/28 17:37:02 thorpej Exp $ */
+/* $NetBSD: itevar.h,v 1.21 2005/06/03 11:52:50 tsutsui Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -119,7 +119,7 @@
void (*ite_cursor)(struct ite_data *, int);
void (*ite_scroll)(struct ite_data *, int, int, int, int);
u_char (*ite_readbyte)(struct ite_data *, int);
- void (*ite_writeglyph)(struct ite_data *, u_char *, u_char *);
+ void (*ite_writeglyph)(struct ite_data *, volatile u_char *, u_char *);
};
struct ite_softc {
@@ -261,5 +261,5 @@
void ite_fontinfo(struct ite_data *);
void ite_fontinit(struct ite_data *);
u_char ite_readbyte(struct ite_data *, int);
-void ite_writeglyph(struct ite_data *, u_char *, u_char *);
+void ite_writeglyph(struct ite_data *, volatile u_char *, u_char *);
#endif
Home |
Main Index |
Thread Index |
Old Index