Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/dev Fix for gcc -Wcast-qual.



details:   https://anonhg.NetBSD.org/src/rev/33950f9d0dbc
branches:  trunk
changeset: 581718:33950f9d0dbc
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Jun 04 04:32:11 2005 +0000

description:
Fix for gcc -Wcast-qual.

diffstat:

 sys/arch/sparc/dev/cgfourteen.c |  24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diffs (80 lines):

diff -r d65e1de31db0 -r 33950f9d0dbc sys/arch/sparc/dev/cgfourteen.c
--- a/sys/arch/sparc/dev/cgfourteen.c   Sat Jun 04 00:47:18 2005 +0000
+++ b/sys/arch/sparc/dev/cgfourteen.c   Sat Jun 04 04:32:11 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cgfourteen.c,v 1.38 2003/11/13 03:09:28 chs Exp $ */
+/*     $NetBSD: cgfourteen.c,v 1.39 2005/06/04 04:32:11 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -78,7 +78,7 @@
 #undef CG14_CG8
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgfourteen.c,v 1.38 2003/11/13 03:09:28 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgfourteen.c,v 1.39 2005/06/04 04:32:11 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -190,7 +190,7 @@
        struct fbdevice *fb = &sc->sc_fb;
        bus_space_handle_t bh;
        int node, ramsize;
-       u_int32_t *lut;
+       volatile u_int32_t *lut;
        int i, isconsole;
 
        node = sa->sa_node;
@@ -284,7 +284,7 @@
        /*
         * Grab the initial colormap
         */
-       lut = (u_int32_t *) sc->sc_clut1->clut_lut;
+       lut = sc->sc_clut1->clut_lut;
        for (i = 0; i < CG14_CLUT_SIZE; i++)
                sc->sc_cmap.cm_chip[i] = lut[i];
 
@@ -632,8 +632,8 @@
 cg14_init(sc)
        struct cgfourteen_softc *sc;
 {
-       u_int32_t *clut;
-       u_int8_t  *xlut;
+       volatile u_int32_t *clut;
+       volatile u_int8_t  *xlut;
        int i;
 
        /*
@@ -647,8 +647,8 @@
        sc->sc_savectl = sc->sc_ctl->ctl_mctl;
        sc->sc_savehwc = sc->sc_hwc->curs_ctl;
 
-       clut = (u_int32_t *) sc->sc_clut1->clut_lut;
-       xlut = (u_int8_t *) sc->sc_xlut->xlut_lut;
+       clut = sc->sc_clut1->clut_lut;
+       xlut = sc->sc_xlut->xlut_lut;
        for (i = 0; i < CG14_CLUT_SIZE; i++) {
                sc->sc_saveclut.cm_chip[i] = clut[i];
                sc->sc_savexlut[i] = xlut[i];
@@ -678,8 +678,8 @@
 cg14_reset(sc) /* Restore the state saved on cg14_init */
        struct cgfourteen_softc *sc;
 {
-       u_int32_t *clut;
-       u_int8_t  *xlut;
+       volatile u_int32_t *clut;
+       volatile u_int8_t  *xlut;
        int i;
 
        /*
@@ -699,8 +699,8 @@
                                                    CG14_MCTL_POWERCTL));
        sc->sc_hwc->curs_ctl = sc->sc_savehwc;
 
-       clut = (u_int32_t *) sc->sc_clut1->clut_lut;
-       xlut = (u_int8_t *) sc->sc_xlut->xlut_lut;
+       clut = sc->sc_clut1->clut_lut;
+       xlut = sc->sc_xlut->xlut_lut;
        for (i = 0; i < CG14_CLUT_SIZE; i++) {
                clut[i] = sc->sc_saveclut.cm_chip[i];
                xlut[i] = sc->sc_savexlut[i];



Home | Main Index | Thread Index | Old Index