Source-Changes-HG archive

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

[src/trunk]: src/sys GCC 4.8 build fixes from John D. Baker



details:   https://anonhg.NetBSD.org/src/rev/9f7f804a049f
branches:  trunk
changeset: 328465:9f7f804a049f
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Apr 03 23:49:47 2014 +0000

description:
GCC 4.8 build fixes from John D. Baker

diffstat:

 sys/arch/prep/pci/pci_machdep.c   |   9 ++++-----
 sys/arch/prep/prep/machdep.c      |   8 ++------
 sys/arch/prep/prep/platform.c     |  11 +++++------
 sys/arch/prep/stand/boot/pci.c    |   4 +---
 sys/arch/prep/stand/boot/siop.c   |   8 +++-----
 sys/arch/prep/stand/boot/vreset.c |   5 ++---
 sys/dev/isa/pckbc_isa.c           |   6 ++++--
 7 files changed, 21 insertions(+), 30 deletions(-)

diffs (242 lines):

diff -r 7380ed9bebd2 -r 9f7f804a049f sys/arch/prep/pci/pci_machdep.c
--- a/sys/arch/prep/pci/pci_machdep.c   Thu Apr 03 22:51:38 2014 +0000
+++ b/sys/arch/prep/pci/pci_machdep.c   Thu Apr 03 23:49:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.39 2014/03/26 16:01:43 christos Exp $        */
+/*     $NetBSD: pci_machdep.c,v 1.40 2014/04/03 23:49:47 mrg Exp $     */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.39 2014/03/26 16:01:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.40 2014/04/03 23:49:47 mrg Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -153,13 +153,12 @@
        prop_dictionary_t dict, devsub;
        prop_object_t pinsub;
        prop_number_t pbus;
-       int busno, bus, pin, line, swiz, dev, origdev, i;
+       int busno, pin, line, dev, origdev, i;
        char key[20];
 
        pin = pa->pa_intrpin;
        line = pa->pa_intrline;
-       bus = busno = pa->pa_bus;
-       swiz = pa->pa_intrswiz;
+       busno = pa->pa_bus;
        origdev = dev = pa->pa_device;
        i = 0;
 
diff -r 7380ed9bebd2 -r 9f7f804a049f sys/arch/prep/prep/machdep.c
--- a/sys/arch/prep/prep/machdep.c      Thu Apr 03 22:51:38 2014 +0000
+++ b/sys/arch/prep/prep/machdep.c      Thu Apr 03 23:49:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.74 2013/04/21 15:42:11 kiyohara Exp $    */
+/*     $NetBSD: machdep.c,v 1.75 2014/04/03 23:49:47 mrg Exp $ */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.74 2013/04/21 15:42:11 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.75 2014/04/03 23:49:47 mrg Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_openpic.h"
@@ -313,7 +313,6 @@
 {
        uint32_t l;
        uint8_t *p;
-       void *v;
        int tag, size, item, i;
        unsigned char *baseaddr = NULL;
 
@@ -329,7 +328,6 @@
                struct _L4_PPCPack *pa = &pack->L4_Data.L4_PPCPack;
 
                tag = *p;
-               v = p;
                if (tag_type(p[0]) == PNP_SMALL) {
                        size = tag_small_count(tag) + 1;
                        continue;
@@ -383,7 +381,6 @@
 {
        uint32_t l, addr;
        uint8_t *p;
-       void *v;
        int tag, size, item;
 
        l = be32toh(dev->AllocatedOffset);
@@ -395,7 +392,6 @@
                struct _L4_PPCPack *pa = &pack->L4_Data.L4_PPCPack;
 
                tag = *p;
-               v = p;
                if (tag_type(p[0]) == PNP_SMALL) {
                        size = tag_small_count(tag) + 1;
                        continue;
diff -r 7380ed9bebd2 -r 9f7f804a049f sys/arch/prep/prep/platform.c
--- a/sys/arch/prep/prep/platform.c     Thu Apr 03 22:51:38 2014 +0000
+++ b/sys/arch/prep/prep/platform.c     Thu Apr 03 23:49:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: platform.c,v 1.27 2014/03/26 16:01:43 christos Exp $   */
+/*     $NetBSD: platform.c,v 1.28 2014/04/03 23:49:47 mrg Exp $        */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: platform.c,v 1.27 2014/03/26 16:01:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: platform.c,v 1.28 2014/04/03 23:49:47 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -85,12 +85,12 @@
 void
 cpu_setup_prep_generic(device_t dev)
 {
-       u_int8_t l2ctrl, cpuinf;
+       u_int8_t l2ctrl;
 
        /* system control register */
        l2ctrl = inb(PREP_BUS_SPACE_IO + 0x81c);
        /* device status register */
-       cpuinf = inb(PREP_BUS_SPACE_IO + 0x80c);
+       (void)inb(PREP_BUS_SPACE_IO + 0x80c);
 
        /* Enable L2 cache */
        outb(PREP_BUS_SPACE_IO + 0x81c, l2ctrl | 0xc0);
@@ -222,7 +222,7 @@
 create_intr_map(void *v, prop_dictionary_t dict)
 {
        prop_dictionary_t sub;
-       int item, size, i, j, bus, numslots;
+       int item, size, i, j, numslots;
        int tag = *(unsigned char *)v;
        unsigned char *q = v;
        PCIInfoPack *pi = v;
@@ -238,7 +238,6 @@
                return size;
 
        numslots = (le16dec(&pi->count0)-21)/sizeof(IntrMap);
-       bus = pi->busnum;
 
        for (i = 0; i < numslots; i++) {
                int lines[MAX_PCI_INTRS] = { 0, 0, 0, 0 };
diff -r 7380ed9bebd2 -r 9f7f804a049f sys/arch/prep/stand/boot/pci.c
--- a/sys/arch/prep/stand/boot/pci.c    Thu Apr 03 22:51:38 2014 +0000
+++ b/sys/arch/prep/stand/boot/pci.c    Thu Apr 03 23:49:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci.c,v 1.1 2012/05/19 14:40:12 kiyohara Exp $ */
+/*     $NetBSD: pci.c,v 1.2 2014/04/03 23:49:47 mrg Exp $      */
 
 /*
  * Copyright (C) 1995-1997 Gary Thomas (gdt%linuxppc.org@localhost)
@@ -158,7 +158,6 @@
        int slot, r;
        struct PCI_cinfo *pslot;
        int VGAslot = -1;
-       int highVGAslot = 0;
 
        for (slot = start + 1; slot < PCI_NSLOTS; slot++) {
                pslot = &PCI_slots[slot];
@@ -171,7 +170,6 @@
                            ((pslot->regs[CLASS] & 0xffffff00) ==
                                0x00010000)) {
                                /* it's a VGA card */
-                               highVGAslot = slot;
                                if ((pslot->regs[CMD] & 0x03)) {
                                        /* fW enabled it */
                                        VGAslot = slot;
diff -r 7380ed9bebd2 -r 9f7f804a049f sys/arch/prep/stand/boot/siop.c
--- a/sys/arch/prep/stand/boot/siop.c   Thu Apr 03 22:51:38 2014 +0000
+++ b/sys/arch/prep/stand/boot/siop.c   Thu Apr 03 23:49:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siop.c,v 1.1 2012/05/19 14:40:13 kiyohara Exp $        */
+/*     $NetBSD: siop.c,v 1.2 2014/04/03 23:49:47 mrg Exp $     */
 /*
  * Copyright (c) 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -238,7 +238,7 @@
        int offset, target, lun, tag, restart = 0, need_reset = 0;
        uint32_t dsa, irqcode;
        uint16_t sist;
-       uint8_t dstat, sstat1, istat;
+       uint8_t dstat = 0, sstat1, istat;
 
        istat = readb(adp->addr + SIOP_ISTAT);
        if ((istat & (ISTAT_INTF | ISTAT_DIP | ISTAT_SIP)) == 0)
@@ -604,7 +604,7 @@
 {
        struct siop_xfer *siop_xfer = adp->xfer;
        uint32_t dsa, *script = adp->script;
-       int target, lun, slot;
+       int slot;
        void *scriptaddr = (void *)local_to_PCI((u_long)script);
        const int siop_common_xfer_size = sizeof(struct siop_common_xfer);
 
@@ -631,8 +631,6 @@
        } else {
                slot++;
        }
-       target = xs->target;
-       lun = xs->lun;
        /*
         * find a free scheduler slot and load it.
         */
diff -r 7380ed9bebd2 -r 9f7f804a049f sys/arch/prep/stand/boot/vreset.c
--- a/sys/arch/prep/stand/boot/vreset.c Thu Apr 03 22:51:38 2014 +0000
+++ b/sys/arch/prep/stand/boot/vreset.c Thu Apr 03 23:49:47 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vreset.c,v 1.8 2008/09/13 15:58:01 tsutsui Exp $ */
+/* $NetBSD: vreset.c,v 1.9 2014/04/03 23:49:47 mrg Exp $ */
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -234,9 +234,8 @@
 static void
 write_attr(u_int8_t index, u_int8_t data, u_int8_t videoOn)
 {
-       u_int8_t v;
 
-       v = inb(0x3da);         /* reset attr addr toggle */
+       (void)inb(0x3da);       /* reset attr addr toggle */
        if (videoOn)
                outb(0x3c0, (index & 0x1F) | 0x20);
        else
diff -r 7380ed9bebd2 -r 9f7f804a049f sys/dev/isa/pckbc_isa.c
--- a/sys/dev/isa/pckbc_isa.c   Thu Apr 03 22:51:38 2014 +0000
+++ b/sys/dev/isa/pckbc_isa.c   Thu Apr 03 23:49:47 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbc_isa.c,v 1.25 2008/05/25 16:19:12 jmcneill Exp $ */
+/* $NetBSD: pckbc_isa.c,v 1.26 2014/04/03 23:49:47 mrg Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbc_isa.c,v 1.25 2008/05/25 16:19:12 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc_isa.c,v 1.26 2014/04/03 23:49:47 mrg Exp $");
 
 #include "opt_pckbc.h"
 
@@ -123,6 +123,8 @@
 #endif
                        ok = 0;
                }
+#else
+               __USE(res);
 #endif /* PCKBCNOTEST */
  out:
                bus_space_unmap(iot, ioh_d, 1);



Home | Main Index | Thread Index | Old Index