Module Name:    src
Committed By:   mrg
Date:           Thu Apr  3 23:49:47 UTC 2014

Modified Files:
        src/sys/arch/prep/pci: pci_machdep.c
        src/sys/arch/prep/prep: machdep.c platform.c
        src/sys/arch/prep/stand/boot: pci.c siop.c vreset.c
        src/sys/dev/isa: pckbc_isa.c

Log Message:
GCC 4.8 build fixes from John D. Baker


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/prep/pci/pci_machdep.c
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/prep/prep/machdep.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/prep/prep/platform.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/prep/stand/boot/pci.c \
    src/sys/arch/prep/stand/boot/siop.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/prep/stand/boot/vreset.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/isa/pckbc_isa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/prep/pci/pci_machdep.c
diff -u src/sys/arch/prep/pci/pci_machdep.c:1.39 src/sys/arch/prep/pci/pci_machdep.c:1.40
--- src/sys/arch/prep/pci/pci_machdep.c:1.39	Wed Mar 26 16:01:43 2014
+++ src/sys/arch/prep/pci/pci_machdep.c	Thu Apr  3 23:49:47 2014
@@ -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 @@ prep_pci_intr_map(const struct pci_attac
 	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;
 

Index: src/sys/arch/prep/prep/machdep.c
diff -u src/sys/arch/prep/prep/machdep.c:1.74 src/sys/arch/prep/prep/machdep.c:1.75
--- src/sys/arch/prep/prep/machdep.c:1.74	Sun Apr 21 15:42:11 2013
+++ src/sys/arch/prep/prep/machdep.c	Thu Apr  3 23:49:47 2014
@@ -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 @@ prep_setup_openpic(PPC_DEVICE *dev)
 {
 	uint32_t l;
 	uint8_t *p;
-	void *v;
 	int tag, size, item, i;
 	unsigned char *baseaddr = NULL;
 
@@ -329,7 +328,6 @@ prep_setup_openpic(PPC_DEVICE *dev)
 		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 @@ setup_ivr(PPC_DEVICE *dev)
 {
 	uint32_t l, addr;
 	uint8_t *p;
-	void *v;
 	int tag, size, item;
 
 	l = be32toh(dev->AllocatedOffset);
@@ -395,7 +392,6 @@ setup_ivr(PPC_DEVICE *dev)
 		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;

Index: src/sys/arch/prep/prep/platform.c
diff -u src/sys/arch/prep/prep/platform.c:1.27 src/sys/arch/prep/prep/platform.c:1.28
--- src/sys/arch/prep/prep/platform.c:1.27	Wed Mar 26 16:01:43 2014
+++ src/sys/arch/prep/prep/platform.c	Thu Apr  3 23:49:47 2014
@@ -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 @@ find_platform_quirk(const char *model)
 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 @@ static int
 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 @@ create_intr_map(void *v, prop_dictionary
 		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 };

Index: src/sys/arch/prep/stand/boot/pci.c
diff -u src/sys/arch/prep/stand/boot/pci.c:1.1 src/sys/arch/prep/stand/boot/pci.c:1.2
--- src/sys/arch/prep/stand/boot/pci.c:1.1	Sat May 19 14:40:12 2012
+++ src/sys/arch/prep/stand/boot/pci.c	Thu Apr  3 23:49:47 2014
@@ -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 (g...@linuxppc.org)
@@ -158,7 +158,6 @@ scan_PCI(int start)
 	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 @@ scan_PCI(int start)
 			    ((pslot->regs[CLASS] & 0xffffff00) ==
 				0x00010000)) {
 				/* it's a VGA card */
-				highVGAslot = slot;
 				if ((pslot->regs[CMD] & 0x03)) {
 					/* fW enabled it */
 					VGAslot = slot;
Index: src/sys/arch/prep/stand/boot/siop.c
diff -u src/sys/arch/prep/stand/boot/siop.c:1.1 src/sys/arch/prep/stand/boot/siop.c:1.2
--- src/sys/arch/prep/stand/boot/siop.c:1.1	Sat May 19 14:40:13 2012
+++ src/sys/arch/prep/stand/boot/siop.c	Thu Apr  3 23:49:47 2014
@@ -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 @@ siop_intr(struct siop_adapter *adp)
 	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 @@ siop_start(struct siop_adapter *adp, str
 {
 	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 @@ siop_start(struct siop_adapter *adp, str
 	} else {
 		slot++;
 	}
-	target = xs->target;
-	lun = xs->lun;
 	/*
 	 * find a free scheduler slot and load it.
 	 */

Index: src/sys/arch/prep/stand/boot/vreset.c
diff -u src/sys/arch/prep/stand/boot/vreset.c:1.8 src/sys/arch/prep/stand/boot/vreset.c:1.9
--- src/sys/arch/prep/stand/boot/vreset.c:1.8	Sat Sep 13 15:58:01 2008
+++ src/sys/arch/prep/stand/boot/vreset.c	Thu Apr  3 23:49:47 2014
@@ -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 @@ vga_reset(u_char *ISA_mem)
 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

Index: src/sys/dev/isa/pckbc_isa.c
diff -u src/sys/dev/isa/pckbc_isa.c:1.25 src/sys/dev/isa/pckbc_isa.c:1.26
--- src/sys/dev/isa/pckbc_isa.c:1.25	Sun May 25 16:19:12 2008
+++ src/sys/dev/isa/pckbc_isa.c	Thu Apr  3 23:49:47 2014
@@ -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 @@ pckbc_isa_match(device_t parent, cfdata_
 #endif
 			ok = 0;
 		}
+#else
+		__USE(res);
 #endif /* PCKBCNOTEST */
  out:
 		bus_space_unmap(iot, ioh_d, 1);

Reply via email to