Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/x86 Use the global pci_mode to avoid 'set but n...



details:   https://anonhg.NetBSD.org/src/rev/5abf92656bde
branches:  trunk
changeset: 327286:5abf92656bde
user:      dsl <dsl%NetBSD.org@localhost>
date:      Mon Mar 03 22:09:32 2014 +0000

description:
Use the global pci_mode to avoid 'set but not used' warnings from gcc 4.8.3.

diffstat:

 sys/arch/xen/x86/mainbus.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (40 lines):

diff -r de2e6a0a497d -r 5abf92656bde sys/arch/xen/x86/mainbus.c
--- a/sys/arch/xen/x86/mainbus.c        Mon Mar 03 21:01:40 2014 +0000
+++ b/sys/arch/xen/x86/mainbus.c        Mon Mar 03 22:09:32 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.17 2014/01/31 10:37:01 bouyer Exp $      */
+/*     $NetBSD: mainbus.c,v 1.18 2014/03/03 22:09:32 dsl Exp $ */
 /*     NetBSD: mainbus.c,v 1.53 2003/10/27 14:11:47 junyoung Exp       */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.17 2014/01/31 10:37:01 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.18 2014/03/03 22:09:32 dsl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -133,9 +133,6 @@
 void
 mainbus_attach(device_t parent, device_t self, void *aux)
 {
-#if defined(DOM0OPS) && NPCI > 0
-       int mode;
-#endif
        union mainbus_attach_args mba;
 #if defined(DOM0OPS)
        int numcpus = 0;
@@ -157,9 +154,9 @@
 #endif
 #if NPCI > 0
                /* ACPI needs to be able to access PCI configuration space. */
-               mode = pci_mode_detect();
+               pci_mode_detect();
 #ifdef PCI_BUS_FIXUP
-               if (mode != 0) {
+               if (pci_mode != 0) {
                        pci_maxbus = pci_bus_fixup(NULL, 0);
                        aprint_debug_dev(self, "PCI bus max, after "
                            "pci_bus_fixup: %i\n", pci_maxbus);



Home | Main Index | Thread Index | Old Index