Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mac68k/mac68k Avoid unused variables



details:   https://anonhg.NetBSD.org/src/rev/cf66759aca6a
branches:  trunk
changeset: 790711:cf66759aca6a
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Oct 19 19:08:39 2013 +0000

description:
Avoid unused variables

diffstat:

 sys/arch/mac68k/mac68k/bus_space.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (65 lines):

diff -r 78cf65a6a9e7 -r cf66759aca6a sys/arch/mac68k/mac68k/bus_space.c
--- a/sys/arch/mac68k/mac68k/bus_space.c        Sat Oct 19 19:03:30 2013 +0000
+++ b/sys/arch/mac68k/mac68k/bus_space.c        Sat Oct 19 19:08:39 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_space.c,v 1.31 2008/04/28 20:23:27 martin Exp $    */
+/*     $NetBSD: bus_space.c,v 1.32 2013/10/19 19:08:39 martin Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.31 2008/04/28 20:23:27 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.32 2013/10/19 19:08:39 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -139,7 +139,9 @@
 bus_space_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size, int flags,
              bus_space_handle_t *hp)
 {
+#ifdef DIAGNOSTIC
        paddr_t pa, endpa;
+#endif
        int error;
 
        /*
@@ -151,10 +153,10 @@
        if (error)
                return (error);
 
+#ifdef DIAGNOSTIC
        pa = m68k_trunc_page(bpa + t);
        endpa = m68k_round_page((bpa + t + size) - 1);
 
-#ifdef DIAGNOSTIC
        if (endpa <= pa)
                panic("bus_space_map: overflow");
 #endif
@@ -269,7 +271,6 @@
 mac68k_bus_space_probe(bus_space_tag_t t, bus_space_handle_t h,
                       bus_size_t offset, int size)
 {
-       int i;
        label_t faultbuf;
 
        nofault = &faultbuf;
@@ -280,13 +281,13 @@
 
        switch (size) {
        case 1:
-               i = bus_space_read_1(t, h, offset);
+               bus_space_read_1(t, h, offset);
                break;
        case 2:
-               i = bus_space_read_2(t, h, offset);
+               bus_space_read_2(t, h, offset);
                break;
        case 4:
-               i = bus_space_read_4(t, h, offset);
+               bus_space_read_4(t, h, offset);
                break;
        case 8:
        default:



Home | Main Index | Thread Index | Old Index