Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k Shut up gcc -Wall.



details:   https://anonhg.NetBSD.org/src/rev/c1d439ba1410
branches:  trunk
changeset: 467419:c1d439ba1410
user:      minoura <minoura%NetBSD.org@localhost>
date:      Wed Mar 24 14:07:38 1999 +0000

description:
Shut up gcc -Wall.

diffstat:

 sys/arch/x68k/dev/com.c          |  14 ++++-----
 sys/arch/x68k/dev/fd.c           |   8 +++--
 sys/arch/x68k/dev/grf_conf.c     |  22 ++++++++--------
 sys/arch/x68k/dev/intio.c        |   4 +-
 sys/arch/x68k/dev/intio_dmac.c   |   4 +-
 sys/arch/x68k/dev/kbd.c          |  22 +++++++++++----
 sys/arch/x68k/dev/mha.c          |  55 ++++++++++++++++++++-------------------
 sys/arch/x68k/dev/ms.c           |   4 +-
 sys/arch/x68k/dev/neptune.c      |   4 +-
 sys/arch/x68k/dev/neptunevar.h   |   5 ++-
 sys/arch/x68k/dev/opm.c          |   4 +-
 sys/arch/x68k/dev/opmbell.c      |  10 +++++-
 sys/arch/x68k/dev/rtclock.c      |   6 ++--
 sys/arch/x68k/dev/scsirom.c      |   6 ++--
 sys/arch/x68k/dev/spc.c          |   4 +-
 sys/arch/x68k/dev/xel.c          |   4 +-
 sys/arch/x68k/dev/zs.c           |   5 +--
 sys/arch/x68k/include/cpu.h      |   7 ++++-
 sys/arch/x68k/include/iteioctl.h |  12 +--------
 sys/arch/x68k/x68k/sys_machdep.c |   6 ++-
 sys/arch/x68k/x68k/trap.c        |  16 ++++++++--
 21 files changed, 122 insertions(+), 100 deletions(-)

diffs (truncated from 812 to 300 lines):

diff -r 8fe23a9c41dc -r c1d439ba1410 sys/arch/x68k/dev/com.c
--- a/sys/arch/x68k/dev/com.c   Wed Mar 24 14:01:50 1999 +0000
+++ b/sys/arch/x68k/dev/com.c   Wed Mar 24 14:07:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com.c,v 1.14 1998/08/15 17:47:16 mycroft Exp $ */
+/*     $NetBSD: com.c,v 1.15 1999/03/24 14:07:38 minoura Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -172,7 +172,7 @@
 
 #define        outb(addr, val)         *(u_char *)(addr) = (val)
 #define        inb(addr)               *(u_char *)(addr)
-#define pio(addr,regno)        (addr+1+regno*2)
+#define pio(addr,regno)        ((addr)+1+(regno)*2)
 
 #ifdef COMCONSOLE
 int    comdefaultrate = CONSPEED;
@@ -231,7 +231,7 @@
        int iobase;
 {
 
-       if (badbaddr(pio(iobase, com_lcr)))
+       if (badbaddr((caddr_t)pio(iobase, com_lcr)))
                return 0;
        /* force access to id reg */
        outb(pio(iobase , com_lcr), 0);
@@ -342,7 +342,6 @@
        struct cfdata *cf = sc->sc_dev.dv_cfdata;
 #endif
        int iobase = (int)&IODEVbase->psx16550 + (COM_NPORTS * 2 * sc->sc_dev.dv_unit);
-       struct tty *tp;
 #ifdef COM_HAYESP
        int     hayesp_ports[] = { 0x140, 0x180, 0x280, 0x300, 0 };
        int     *hayespp;
@@ -351,7 +350,7 @@
        sc->sc_iobase = iobase;
        sc->sc_hwflags = 0;
        sc->sc_swflags = 0;
-       printf(": iobase %lx", sc->sc_iobase);
+       printf(": iobase %x", sc->sc_iobase);
 
 #if 0
        if (sc->sc_dev.dv_unit == comconsole)
@@ -1064,9 +1063,8 @@
        int     iir;
 
 #if 1
-       if (iir = ISSET(inb(pio(iobase , com_iir)), IIR_NOPEND)) {
+       if ((iir = ISSET(inb(pio(iobase , com_iir)), IIR_NOPEND)))
                return (0);
-       }
 #endif
 
        tp = sc->sc_tty;
@@ -1139,7 +1137,7 @@
                        (*linesw[tp->t_line].l_start)(tp);
                }
 
-               if (iir = ISSET(inb(pio(iobase , com_iir)), IIR_NOPEND))
+               if ((iir = ISSET(inb(pio(iobase , com_iir)), IIR_NOPEND)))
                        return (1);
        }
 }
diff -r 8fe23a9c41dc -r c1d439ba1410 sys/arch/x68k/dev/fd.c
--- a/sys/arch/x68k/dev/fd.c    Wed Mar 24 14:01:50 1999 +0000
+++ b/sys/arch/x68k/dev/fd.c    Wed Mar 24 14:07:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fd.c,v 1.27 1999/03/24 05:51:17 mrg Exp $      */
+/*     $NetBSD: fd.c,v 1.28 1999/03/24 14:07:38 minoura Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -370,7 +370,7 @@
        if (ia->ia_dmaintr == INTIOCF_DMAINTR_DEFAULT)
                ia->ia_dmaintr = FDC_DMAINTR;
 
-       if (ia->ia_intr & 0x03 != 0)
+       if ((ia->ia_intr & 0x03) != 0)
                return 0;
 
        ia->ia_size = 0x2000;
@@ -1277,7 +1277,7 @@
 #endif
                 }}
 #endif
-               if (read = bp->b_flags & B_READ) {
+               if ((read = bp->b_flags & B_READ)) {
                        bcopy(fd->sc_copybuf
                              + (fd->sc_part & SEC_P01 ? FDC_BSIZE : 0),
                              bp->b_data + fd->sc_skip,
@@ -1692,6 +1692,8 @@
        return(0);
 }
 
+#include <dev/cons.h>
+
 /*
  * Mountroot hook: prompt the user to enter the root file system
  * floppy.
diff -r 8fe23a9c41dc -r c1d439ba1410 sys/arch/x68k/dev/grf_conf.c
--- a/sys/arch/x68k/dev/grf_conf.c      Wed Mar 24 14:01:50 1999 +0000
+++ b/sys/arch/x68k/dev/grf_conf.c      Wed Mar 24 14:07:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: grf_conf.c,v 1.3 1998/08/06 14:08:53 minoura Exp $     */
+/*     $NetBSD: grf_conf.c,v 1.4 1999/03/24 14:07:38 minoura Exp $     */
 
 /*
  * Copyright (c) 1991 University of Utah.
@@ -68,17 +68,17 @@
 #endif
 
 struct grfsw grfsw[] = {
-       GID_BUILTIN,    GRFBUILTIN,     "builtin",        cc_init, cc_mode,
-       GID_GVRAM,      GRFBUILTIN,     "graphic",        gv_init, gv_mode,
+       {GID_BUILTIN,   GRFBUILTIN,     "builtin",        cc_init, cc_mode},
+       {GID_GVRAM,     GRFBUILTIN,     "graphic",        gv_init, gv_mode},
 #if 0
-       GID_TOPCAT,     GRFBOBCAT,      "topcat",         tc_init, tc_mode,
-       GID_GATORBOX,   GRFGATOR,       "gatorbox",       gb_init, gb_mode,
-       GID_RENAISSANCE,GRFRBOX,        "renaissance",    rb_init, rb_mode,
-       GID_LRCATSEYE,  GRFCATSEYE,     "lo-res catseye", tc_init, tc_mode,
-       GID_HRCCATSEYE, GRFCATSEYE,     "hi-res catseye", tc_init, tc_mode,
-       GID_HRMCATSEYE, GRFCATSEYE,     "hi-res catseye", tc_init, tc_mode,
-       GID_DAVINCI,    GRFDAVINCI,     "davinci",        dv_init, dv_mode,
-       GID_HYPERION,   GRFHYPERION,    "hyperion",       hy_init, hy_mode,
+       {GID_TOPCAT,    GRFBOBCAT,      "topcat",         tc_init, tc_mode},
+       {GID_GATORBOX,  GRFGATOR,       "gatorbox",       gb_init, gb_mode},
+       {GID_RENAISSANCE,GRFRBOX,       "renaissance",    rb_init, rb_mode},
+       {GID_LRCATSEYE, GRFCATSEYE,     "lo-res catseye", tc_init, tc_mode,
+       {GID_HRCCATSEYE,GRFCATSEYE,     "hi-res catseye", tc_init, tc_mode},
+       {GID_HRMCATSEYE,GRFCATSEYE,     "hi-res catseye", tc_init, tc_mode},
+       {GID_DAVINCI,   GRFDAVINCI,     "davinci",        dv_init, dv_mode},
+       {GID_HYPERION,  GRFHYPERION,    "hyperion",       hy_init, hy_mode},
 #endif
 };
 int    ngrfsw = sizeof(grfsw) / sizeof(grfsw[0]);
diff -r 8fe23a9c41dc -r c1d439ba1410 sys/arch/x68k/dev/intio.c
--- a/sys/arch/x68k/dev/intio.c Wed Mar 24 14:01:50 1999 +0000
+++ b/sys/arch/x68k/dev/intio.c Wed Mar 24 14:07:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intio.c,v 1.4 1999/03/22 03:21:35 minoura Exp $        */
+/*     $NetBSD: intio.c,v 1.5 1999/03/24 14:07:38 minoura Exp $        */
 
 /*
  *
@@ -132,7 +132,7 @@
        intio_intr_handler_t    iiv_handler;
        void                    *iiv_arg;
        int                     iiv_intrcntoff;
-} iiv[256] = {0,};
+} iiv[256] = {{0,},};
 
 extern struct cfdriver intio_cd;
 
diff -r 8fe23a9c41dc -r c1d439ba1410 sys/arch/x68k/dev/intio_dmac.c
--- a/sys/arch/x68k/dev/intio_dmac.c    Wed Mar 24 14:01:50 1999 +0000
+++ b/sys/arch/x68k/dev/intio_dmac.c    Wed Mar 24 14:07:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intio_dmac.c,v 1.3 1999/03/18 12:27:59 minoura Exp $   */
+/*     $NetBSD: intio_dmac.c,v 1.4 1999/03/24 14:07:38 minoura Exp $   */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -377,7 +377,7 @@
                dmac_map[ch][i].da_addr = map->dm_segs[j].ds_addr;
 #ifdef DIAGNOSTIC
                if (map->dm_segs[j].ds_len > 0xff00)
-                       panic ("dmac_program_arraychain: wrong map: %d", map->dm_segs[j].ds_len);
+                       panic ("dmac_program_arraychain: wrong map: %ld", map->dm_segs[j].ds_len);
 #endif
                dmac_map[ch][i].da_count = map->dm_segs[j].ds_len;
        }
diff -r 8fe23a9c41dc -r c1d439ba1410 sys/arch/x68k/dev/kbd.c
--- a/sys/arch/x68k/dev/kbd.c   Wed Mar 24 14:01:50 1999 +0000
+++ b/sys/arch/x68k/dev/kbd.c   Wed Mar 24 14:07:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kbd.c,v 1.7 1999/03/16 16:30:19 minoura Exp $  */
+/*     $NetBSD: kbd.c,v 1.8 1999/03/24 14:07:38 minoura Exp $  */
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -47,6 +47,7 @@
 #include <sys/uio.h>
 #include <sys/kernel.h>
 #include <sys/syslog.h>
+#include <sys/signalvar.h>
 
 #include <machine/cpu.h>
 #include <machine/bus.h>
@@ -57,6 +58,7 @@
 
 /* for sun-like event mode, if you go thru /dev/kbd. */
 #include <arch/x68k/dev/event_var.h>
+
 #include <machine/kbio.h>
 #include <machine/kbd.h>
 #include <machine/vuid_event.h>
@@ -216,6 +218,13 @@
        return EOPNOTSUPP;
 }
 
+#if NBELL > 0
+struct bell_info;
+int opm_bell_setup __P((struct bell_info *));
+void opm_bell_on __P((void));
+void opm_bell_off __P((void));
+#endif
+
 int
 kbdioctl(dev, cmd, data, flag, p)
        dev_t dev;
@@ -259,8 +268,7 @@
 
        case KIOCSBELL:
 #if NBELL > 0
-               /* XXX - so tricky! */
-               return opm_bell_setup((struct kbiocbell *)data);
+               return opm_bell_setup((struct bell_info *)data);
 #else
                return (0);     /* allways success */
 #endif
@@ -322,7 +330,7 @@
        if (! k->sc_event_mode) {
                kbdbuf[kbdputoff++ & KBDBUFMASK] = c;
                setsoftkbd();
-               return;
+               return 0;
        }
 
        /* Keyboard is generating events.  Turn this keystroke into an
@@ -334,13 +342,15 @@
        put = (put + 1) % EV_QSIZE;
        if (put == k->sc_events.ev_get) {
                log(LOG_WARNING, "keyboard event queue overflow\n"); /* ??? */
-               return;
+               return 0;
        }
        fe->id = KEY_CODE(c);
        fe->value = KEY_UP(c) ? VKEY_UP : VKEY_DOWN;
        fe->time = time;
        k->sc_events.ev_put = put;
        EV_WAKEUP(&k->sc_events);
+
+       return 0;
 }
 
 void
@@ -349,7 +359,7 @@
        int s = spltty();
 
        while(kbdgetoff < kbdputoff)
-               ite_filter(kbdbuf[kbdgetoff++ & KBDBUFMASK], ITEFILT_TTY);
+               ite_filter(kbdbuf[kbdgetoff++ & KBDBUFMASK]);
        kbdgetoff = kbdputoff = 0;
 
        splx(s);
diff -r 8fe23a9c41dc -r c1d439ba1410 sys/arch/x68k/dev/mha.c
--- a/sys/arch/x68k/dev/mha.c   Wed Mar 24 14:01:50 1999 +0000
+++ b/sys/arch/x68k/dev/mha.c   Wed Mar 24 14:07:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mha.c,v 1.14 1999/03/22 08:54:14 minoura Exp $ */
+/*     $NetBSD: mha.c,v 1.15 1999/03/24 14:07:38 minoura Exp $ */
 
 /*-
  * Copyright (c) 1996-1999 The NetBSD Foundation, Inc.
@@ -35,6 +35,7 @@
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
+*/
 
 /*-
  * Copyright (c) 1994 Jarle Greipsland
@@ -306,7 +307,7 @@
        if (bus_space_map(iot, ia->ia_addr, 0x20, BUS_SPACE_MAP_SHIFTED,
                          &ioh) < 0)
                return 0;
-       if (!badaddr (INTIO_ADDR(ia->ia_addr + 0)))
+       if (!badaddr ((caddr_t)INTIO_ADDR(ia->ia_addr + 0)))
                return 0;
        bus_space_unmap(iot, ioh, 0x20);
 
@@ -383,7 +384,7 @@
        ATR = 0x01;
        PER = 0xc9;
 #endif
-       IER = IE_ALL;   /* ¤¹¤Ù¤Æ¤Î³ä¤ê¹þ¤ß¤òµö²Ä */
+       IER = IE_ALL;   /* すべての割り込みを許可 */
 #if 1
        GLR = 0x00;
        DMR = 0x30;
@@ -591,7 +592,7 @@
 
        SPC_TRACE(("[mhaselect(t%d,l%d,cmd:%x)] ", target, lun, *(u_char *)cmd));
 
-       /* CDB ¤ò SPC ¤Î MCS REG ¤Ë¥»¥Ã¥È¤¹¤ë */
+       /* CDB を SPC の MCS REG にセットする */
        /* Now the command into the FIFO */
        WAIT;



Home | Main Index | Thread Index | Old Index