Source-Changes-HG archive

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

[src/trunk]: src/sys/arch fix unused variable warnings



details:   https://anonhg.NetBSD.org/src/rev/8a5ae3fc89dd
branches:  trunk
changeset: 791256:8a5ae3fc89dd
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Nov 10 18:27:15 2013 +0000

description:
fix unused variable warnings

diffstat:

 sys/arch/emips/ebus/ace_ebus.c    |   7 ++++---
 sys/arch/emips/ebus/clock_ebus.c  |   6 +++---
 sys/arch/emips/ebus/dz_ebus.c     |  11 +++--------
 sys/arch/emips/ebus/icap_ebus.c   |   6 ++++--
 sys/arch/emips/ebus/if_le_ebus.c  |   5 +++--
 sys/arch/emips/emips/machdep.c    |   7 +++----
 sys/arch/mips/mips/mips_machdep.c |   6 +++---
 sys/arch/mips/mips/pmap.c         |   6 ++++--
 8 files changed, 27 insertions(+), 27 deletions(-)

diffs (250 lines):

diff -r 761c61e3dfa5 -r 8a5ae3fc89dd sys/arch/emips/ebus/ace_ebus.c
--- a/sys/arch/emips/ebus/ace_ebus.c    Sun Nov 10 17:18:32 2013 +0000
+++ b/sys/arch/emips/ebus/ace_ebus.c    Sun Nov 10 18:27:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ace_ebus.c,v 1.8 2013/10/13 06:55:34 riz Exp $ */
+/*     $NetBSD: ace_ebus.c,v 1.9 2013/11/10 18:27:15 christos Exp $    */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.8 2013/10/13 06:55:34 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.9 2013/11/10 18:27:15 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1462,7 +1462,7 @@
  * Rest of code lifted with mods from the dev\ata\wd.c driver
  */
 
-/*     $NetBSD: ace_ebus.c,v 1.8 2013/10/13 06:55:34 riz Exp $ */
+/*     $NetBSD: ace_ebus.c,v 1.9 2013/11/10 18:27:15 christos Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -2431,6 +2431,7 @@
            va, size, blkno);
        DELAY(500 * 1000);      /* half a second */
        err = 0;
+       __USE(err);
 #endif
 
        acedoingadump = 0;
diff -r 761c61e3dfa5 -r 8a5ae3fc89dd sys/arch/emips/ebus/clock_ebus.c
--- a/sys/arch/emips/ebus/clock_ebus.c  Sun Nov 10 17:18:32 2013 +0000
+++ b/sys/arch/emips/ebus/clock_ebus.c  Sun Nov 10 18:27:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock_ebus.c,v 1.6 2011/06/12 04:44:27 tsutsui Exp $   */
+/*     $NetBSD: clock_ebus.c,v 1.7 2013/11/10 18:27:15 christos Exp $  */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: clock_ebus.c,v 1.6 2011/06/12 04:44:27 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock_ebus.c,v 1.7 2013/11/10 18:27:15 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -260,7 +260,7 @@
        struct eclock_softc *sc = cookie;
        struct _Tc *tc = sc->sc_dp;
        struct clockframe *cf = f;
-       volatile uint32_t x;
+       volatile uint32_t x __unused;
 
        x = tc->Control;
        tc->DownCounterHigh = 0;
diff -r 761c61e3dfa5 -r 8a5ae3fc89dd sys/arch/emips/ebus/dz_ebus.c
--- a/sys/arch/emips/ebus/dz_ebus.c     Sun Nov 10 17:18:32 2013 +0000
+++ b/sys/arch/emips/ebus/dz_ebus.c     Sun Nov 10 18:27:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dz_ebus.c,v 1.5 2011/06/12 05:22:30 tsutsui Exp $      */
+/*     $NetBSD: dz_ebus.c,v 1.6 2013/11/10 18:27:15 christos Exp $     */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v 1.5 2011/06/12 05:22:30 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v 1.6 2013/11/10 18:27:15 christos Exp $");
 
 #include "opt_ddb.h"
 
@@ -514,7 +514,7 @@
 dzrint(struct dz_softc *sc, uint32_t csr)
 {
        struct tty *tp;
-       int cc, mcc;
+       int cc;
        struct _Usart *dzr;
 
        sc->sc_rxint++;
@@ -523,11 +523,6 @@
        cc = dzr->RxData;
        tp = sc->sc_dz.dz_tty;
 
-       if (csr & USI_RXBRK)
-               mcc = CNC_BREAK;
-       else
-               mcc = cc;
-
        /* clear errors before we print or bail out */
        if (csr & (USI_OVRE|USI_FRAME|USI_PARE))
                dzr->Control = USC_RSTSTA;
diff -r 761c61e3dfa5 -r 8a5ae3fc89dd sys/arch/emips/ebus/icap_ebus.c
--- a/sys/arch/emips/ebus/icap_ebus.c   Sun Nov 10 17:18:32 2013 +0000
+++ b/sys/arch/emips/ebus/icap_ebus.c   Sun Nov 10 18:27:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: icap_ebus.c,v 1.3 2012/10/27 17:17:45 chs Exp $        */
+/*     $NetBSD: icap_ebus.c,v 1.4 2013/11/10 18:27:15 christos Exp $   */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: icap_ebus.c,v 1.3 2012/10/27 17:17:45 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icap_ebus.c,v 1.4 2013/11/10 18:27:15 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -387,6 +387,8 @@
         saf = sc->sc_dp->SizeAndFlags;
         hi  = sc->sc_dp->BufferAddressHi32; /* BUGBUG 64bit */
         lo  = sc->sc_dp->BufferAddressLo32; /* this pops the fifo */
+       __USE(hi);
+       __USE(lo);
 
         /* Say its done that much (and sanity)
          */
diff -r 761c61e3dfa5 -r 8a5ae3fc89dd sys/arch/emips/ebus/if_le_ebus.c
--- a/sys/arch/emips/ebus/if_le_ebus.c  Sun Nov 10 17:18:32 2013 +0000
+++ b/sys/arch/emips/ebus/if_le_ebus.c  Sun Nov 10 18:27:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_le_ebus.c,v 1.4 2012/02/02 19:42:59 tls Exp $       */
+/*     $NetBSD: if_le_ebus.c,v 1.5 2013/11/10 18:27:15 christos Exp $  */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.4 2012/02/02 19:42:59 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.5 2013/11/10 18:27:15 christos Exp $");
 
 #include "opt_inet.h"
 
@@ -683,6 +683,7 @@
                saf = sc->sc_regs->SizeAndFlags;
                hi  = sc->sc_regs->BufferAddressHi32; /* BUGBUG 64bit */
                lo  = sc->sc_regs->BufferAddressLo32; /* this pops the fifo */
+               __USE(hi);
 
                fl = saf & (ES_F_MASK &~ ES_F_DONE);
                if (fl == ES_F_RECV)
diff -r 761c61e3dfa5 -r 8a5ae3fc89dd sys/arch/emips/emips/machdep.c
--- a/sys/arch/emips/emips/machdep.c    Sun Nov 10 17:18:32 2013 +0000
+++ b/sys/arch/emips/emips/machdep.c    Sun Nov 10 18:27:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.8 2012/10/27 17:17:46 chs Exp $  */
+/*     $NetBSD: machdep.c,v 1.9 2013/11/10 18:27:15 christos Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2012/10/27 17:17:46 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2013/11/10 18:27:15 christos Exp $");
 
 #include "opt_ddb.h"
 
@@ -491,7 +491,6 @@
 cpu_reboot(volatile int howto, /* XXX volatile to keep gcc happy */
            char *bootstr)
 {
-       int s = 0;
 
        /* take a snap shot before clobbering any registers */
        if (curlwp)
@@ -527,7 +526,7 @@
        }
 
        /* Disable interrupts. */
-       s = splhigh();
+       splhigh();
 
        /* If rebooting and a dump is requested do it. */
        if ((howto & (RB_DUMP | RB_HALT)) == RB_DUMP)
diff -r 761c61e3dfa5 -r 8a5ae3fc89dd sys/arch/mips/mips/mips_machdep.c
--- a/sys/arch/mips/mips/mips_machdep.c Sun Nov 10 17:18:32 2013 +0000
+++ b/sys/arch/mips/mips/mips_machdep.c Sun Nov 10 18:27:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_machdep.c,v 1.257 2013/10/30 06:47:18 uebayasi Exp $      */
+/*     $NetBSD: mips_machdep.c,v 1.258 2013/11/10 18:27:15 christos Exp $      */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.257 2013/10/30 06:47:18 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.258 2013/11/10 18:27:15 christos Exp $");
 
 #define __INTR_PRIVATE
 #include "opt_cputype.h"
@@ -2174,7 +2174,7 @@
 {
        ucontext_t * const uc = arg;
        lwp_t * const l = curlwp;
-       int error;
+       int error __diagused;
 
        error = cpu_setmcontext(l, &uc->uc_mcontext, uc->uc_flags);
        KASSERT(error == 0);
diff -r 761c61e3dfa5 -r 8a5ae3fc89dd sys/arch/mips/mips/pmap.c
--- a/sys/arch/mips/mips/pmap.c Sun Nov 10 17:18:32 2013 +0000
+++ b/sys/arch/mips/mips/pmap.c Sun Nov 10 18:27:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.208 2012/07/05 17:21:02 matt Exp $  */
+/*     $NetBSD: pmap.c,v 1.209 2013/11/10 18:27:15 christos Exp $      */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.208 2012/07/05 17:21:02 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.209 2013/11/10 18:27:15 christos Exp $");
 
 /*
  *     Manages physical address maps.
@@ -2111,6 +2111,7 @@
 {
        struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
        pv_entry_t pv, npv, apv;
+/*###2114 [cc] error: variable 'gen' set but not used [-Werror=unused-but-set-variable]%%%*/
        int16_t gen;
 
        KASSERT(kpreempt_disabled());
@@ -2274,6 +2275,7 @@
                                goto again;
 #endif
 #endif
+                       __USE(gen);
                }
                npv = apv;
                apv = NULL;



Home | Main Index | Thread Index | Old Index