Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp300/stand/common Appease gcc48 -Wunused-but-set-v...



details:   https://anonhg.NetBSD.org/src/rev/04df0f5ca144
branches:  trunk
changeset: 796834:04df0f5ca144
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Jun 21 02:02:40 2014 +0000

description:
Appease gcc48 -Wunused-but-set-variable warnings.

diffstat:

 sys/arch/hp300/stand/common/dcm.c   |  12 ++++++------
 sys/arch/hp300/stand/common/if_le.c |   9 ++++++---
 2 files changed, 12 insertions(+), 9 deletions(-)

diffs (80 lines):

diff -r ed8ca4898095 -r 04df0f5ca144 sys/arch/hp300/stand/common/dcm.c
--- a/sys/arch/hp300/stand/common/dcm.c Sat Jun 21 02:01:21 2014 +0000
+++ b/sys/arch/hp300/stand/common/dcm.c Sat Jun 21 02:02:40 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dcm.c,v 1.8 2011/02/08 20:20:14 rmind Exp $    */
+/*     $NetBSD: dcm.c,v 1.9 2014/06/21 02:02:40 tsutsui Exp $  */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -112,7 +112,7 @@
        struct dcmrfifo *fifo;
        struct dcmpreg *pp;
        unsigned int head;
-       int c, stat, port;
+       int c, port;
 
        port = DCMCONUNIT;
        pp = dcm_preg(dcm, port);
@@ -121,10 +121,10 @@
                return 0;
        fifo = &dcm->dcm_rfifos[3-port][head>>1];
        c = fifo->data_char;
-       stat = fifo->data_stat;
+       (void)fifo->data_stat;
        pp->r_head = (head + 2) & RX_MASK;
        SEM_LOCK(dcm);
-       stat = dcm->dcm_iir;
+       (void)dcm->dcm_iir;
        SEM_UNLOCK(dcm);
        return c;
 }
@@ -145,7 +145,7 @@
        struct dcmpreg *pp;
        int timo;
        unsigned int tail;
-       int port, stat;
+       int port;
 
        port = DCMCONUNIT;
        pp = dcm_preg(dcm, port);
@@ -163,7 +163,7 @@
        while (tail != (pp->t_head & TX_MASK) && --timo)
                ;
        SEM_LOCK(dcm);
-       stat = dcm->dcm_iir;
+       (void)dcm->dcm_iir;
        SEM_UNLOCK(dcm);
 }
 #endif
diff -r ed8ca4898095 -r 04df0f5ca144 sys/arch/hp300/stand/common/if_le.c
--- a/sys/arch/hp300/stand/common/if_le.c       Sat Jun 21 02:01:21 2014 +0000
+++ b/sys/arch/hp300/stand/common/if_le.c       Sat Jun 21 02:02:40 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_le.c,v 1.12 2014/05/01 18:08:47 tsutsui Exp $       */
+/*     $NetBSD: if_le.c,v 1.13 2014/06/21 02:02:40 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1993 Adam Glass
@@ -531,7 +531,10 @@
        int unit = /*nif->nif_unit*/0;
        struct le_softc *sc = &le_softc[unit];
        volatile struct mds *cdm;
-       int timo, i, stat;
+       int timo, stat;
+#if 0
+       int i;
+#endif
 
  le_put_loop:
        timo = 100000;
@@ -545,8 +548,8 @@
        if (stat & (LE_BABL | LE_CERR | LE_MISS | LE_MERR))
                le_error(unit, "le_put(way before xmit)", stat);
        cdm = &sc->sc_td[sc->sc_next_td];
+#if 0
        i = 0;
-#if 0
        while (cdm->flags & LE_OWN) {
                if ((i % 100) == 0)
                        printf("le%d: output buffer busy - flags=%x\n",



Home | Main Index | Thread Index | Old Index