Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/dev Make this build with -Wcast-qual and -Wsha...
details: https://anonhg.NetBSD.org/src/rev/0e3ac8f01b7a
branches: trunk
changeset: 581990:0e3ac8f01b7a
user: he <he%NetBSD.org@localhost>
date: Mon Jun 13 00:14:52 2005 +0000
description:
Make this build with -Wcast-qual and -Wshadow by adding one
__UNVOLATILE() and adding a number of volatile to variable declarations
and renaming a local variable.
diffstat:
sys/arch/x68k/dev/ite_tv.c | 50 +++++++++++++++++++++++-----------------------
1 files changed, 25 insertions(+), 25 deletions(-)
diffs (189 lines):
diff -r edf332148d74 -r 0e3ac8f01b7a sys/arch/x68k/dev/ite_tv.c
--- a/sys/arch/x68k/dev/ite_tv.c Mon Jun 13 00:12:21 2005 +0000
+++ b/sys/arch/x68k/dev/ite_tv.c Mon Jun 13 00:14:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_tv.c,v 1.11 2005/01/18 07:12:15 chs Exp $ */
+/* $NetBSD: ite_tv.c,v 1.12 2005/06/13 00:14:52 he Exp $ */
/*
* Copyright (c) 1997 Masaru Oki.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ite_tv.c,v 1.11 2005/01/18 07:12:15 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite_tv.c,v 1.12 2005/06/13 00:14:52 he Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -165,7 +165,7 @@
*/
tv_top = 0;
for (i = 0; i < PLANELINES; i++)
- tv_row[i] = (void *)&IODEVbase->tvram[ROWOFFSET(i)];
+ tv_row[i] = (void *)__UNVOLATILE(&IODEVbase->tvram[ROWOFFSET(i)]);
/* shadow ANK font */
memcpy(kern_font, (void *)&IODEVbase->cgrom0_8x16, 256 * FONTHEIGHT);
ite_set_glyph();
@@ -279,13 +279,13 @@
{
short fh, hi;
char *f;
- short *kf;
+ volatile short *kf;
hi = ip->save_char & 0x7f;
if (hi >= 0x21 && hi <= 0x7e) {
/* multibyte character */
- kf = (short *)tv_kfont[hi];
+ kf = (volatile short *)tv_kfont[hi];
kf += (ch & 0x7f) * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < FONTHEIGHT; fh++, p += ROWBYTES)
@@ -308,13 +308,13 @@
{
short fh, hi;
char *f;
- short *kf;
+ volatile short *kf;
hi = ip->save_char & 0x7f;
if (hi >= 0x21 && hi <= 0x7e) {
/* multibyte character */
- kf = (short *)tv_kfont[hi];
+ kf = (volatile short *)tv_kfont[hi];
kf += (ch & 0x7f) * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < FONTHEIGHT; fh++, p += ROWBYTES)
@@ -337,13 +337,13 @@
{
short fh, hi;
char *f;
- short *kf;
+ volatile short *kf;
hi = ip->save_char & 0x7f;
if (hi >= 0x21 && hi <= 0x7e) {
/* multibyte character */
- kf = (short *)tv_kfont[hi];
+ kf = (volatile short *)tv_kfont[hi];
kf += (ch & 0x7f) * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < FONTHEIGHT; fh++, p += ROWBYTES) {
@@ -384,13 +384,13 @@
{
short fh, hi;
char *f;
- short *kf;
+ volatile short *kf;
hi = ip->save_char & 0x7f;
if (hi >= 0x21 && hi <= 0x7e) {
/* multibyte character */
- kf = (short *)tv_kfont[hi];
+ kf = (volatile short *)tv_kfont[hi];
kf += (ch & 0x7f) * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < UNDERLINE; fh++, p += ROWBYTES)
@@ -421,13 +421,13 @@
{
short fh, hi;
char *f;
- short *kf;
+ volatile short *kf;
hi = ip->save_char & 0x7f;
if (hi >= 0x21 && hi <= 0x7e) {
/* multibyte character */
- kf = (short *)tv_kfont[hi];
+ kf = (volatile short *)tv_kfont[hi];
kf += (ch & 0x7f) * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < FONTHEIGHT; fh++, p += ROWBYTES) {
@@ -454,13 +454,13 @@
{
short fh, hi;
char *f;
- short *kf;
+ volatile short *kf;
hi = ip->save_char & 0x7f;
if (hi >= 0x21 && hi <= 0x7e) {
/* multibyte character */
- kf = (short *)tv_kfont[hi];
+ kf = (volatile short *)tv_kfont[hi];
kf += (ch & 0x7f) * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < UNDERLINE; fh++, p += ROWBYTES)
@@ -491,13 +491,13 @@
{
short fh, hi;
char *f;
- short *kf;
+ volatile short *kf;
hi = ip->save_char & 0x7f;
if (hi >= 0x21 && hi <= 0x7e) {
/* multibyte character */
- kf = (short *)tv_kfont[hi];
+ kf = (volatile short *)tv_kfont[hi];
kf += (ch & 0x7f) * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < UNDERLINE; fh++, p += ROWBYTES) {
@@ -538,13 +538,13 @@
{
short fh, hi;
char *f;
- short *kf;
+ volatile short *kf;
hi = ip->save_char & 0x7f;
if (hi >= 0x21 && hi <= 0x7e) {
/* multibyte character */
- kf = (short *)tv_kfont[hi];
+ kf = (volatile short *)tv_kfont[hi];
kf += (ch & 0x7f) * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < UNDERLINE; fh++, p += ROWBYTES) {
@@ -699,13 +699,13 @@
for (pl = 0; pl < PLANESIZE * 4; pl += PLANESIZE) {
short fh;
char *src = CHADDR(srcy, srcx) + pl;
- char *dst = CHADDR(srcy, srcx - count) + pl;
+ char *dest = CHADDR(srcy, srcx - count) + pl;
siz = ip->cols - srcx;
for (fh = 0; fh < FONTHEIGHT; fh++) {
- memcpy(dst, src, siz);
+ memcpy(dest, src, siz);
src += ROWBYTES;
- dst += ROWBYTES;
+ dest += ROWBYTES;
}
}
break;
@@ -714,13 +714,13 @@
for (pl = 0; pl < PLANESIZE * 4; pl += PLANESIZE) {
short fh;
char *src = CHADDR(srcy, srcx) + pl;
- char *dst = CHADDR(srcy, srcx + count) + pl;
+ char *dest = CHADDR(srcy, srcx + count) + pl;
siz = ip->cols - (srcx + count);
for (fh = 0; fh < FONTHEIGHT; fh++) {
- memcpy(dst, src, siz);
+ memcpy(dest, src, siz);
src += ROWBYTES;
- dst += ROWBYTES;
+ dest += ROWBYTES;
}
}
break;
Home |
Main Index |
Thread Index |
Old Index