Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/luna68k/stand/boot Appease gcc 4.8 -Wunused-but-set...



details:   https://anonhg.NetBSD.org/src/rev/0069fb10152b
branches:  trunk
changeset: 795505:0069fb10152b
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Apr 16 11:18:00 2014 +0000

description:
Appease gcc 4.8 -Wunused-but-set-variable warnings.

diffstat:

 sys/arch/luna68k/stand/boot/lance.c   |  4 ++--
 sys/arch/luna68k/stand/boot/machdep.c |  6 +++---
 sys/arch/luna68k/stand/boot/sc.c      |  5 ++---
 3 files changed, 7 insertions(+), 8 deletions(-)

diffs (74 lines):

diff -r 3d21042d0958 -r 0069fb10152b sys/arch/luna68k/stand/boot/lance.c
--- a/sys/arch/luna68k/stand/boot/lance.c       Wed Apr 16 07:29:52 2014 +0000
+++ b/sys/arch/luna68k/stand/boot/lance.c       Wed Apr 16 11:18:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lance.c,v 1.2 2014/01/11 15:51:02 tsutsui Exp $        */
+/*     $NetBSD: lance.c,v 1.3 2014/04/16 11:18:00 tsutsui Exp $        */
 
 /*
  * Copyright (c) 2013 Izumi Tsutsui.  All rights reserved.
@@ -145,7 +145,7 @@
        struct lereg *lereg = sc->sc_reg;
        struct lemem *lemem = sc->sc_mem;
        struct lermd_v *rmd;
-       uint16_t csr;
+       uint16_t csr __unused;
        int len = -1;
 
        lereg->ler_rap = LE_CSR0;
diff -r 3d21042d0958 -r 0069fb10152b sys/arch/luna68k/stand/boot/machdep.c
--- a/sys/arch/luna68k/stand/boot/machdep.c     Wed Apr 16 07:29:52 2014 +0000
+++ b/sys/arch/luna68k/stand/boot/machdep.c     Wed Apr 16 11:18:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.2 2014/01/11 15:51:02 tsutsui Exp $      */
+/*     $NetBSD: machdep.c,v 1.3 2014/04/16 11:18:00 tsutsui Exp $      */
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -87,10 +87,10 @@
 int
 badaddr(volatile void *addr)
 {
-       int i;
        label_t faultbuf;
 
 #ifdef lint
+       int i;
        i = *addr; if (i) return 0;
 #endif
        nofault = (int *) &faultbuf;
@@ -98,7 +98,7 @@
                nofault = NULL;
                return 1;
        }
-       i = *(volatile short *)addr;
+       (void)*(volatile short *)addr;
        nofault = NULL;
        return 0;
 }
diff -r 3d21042d0958 -r 0069fb10152b sys/arch/luna68k/stand/boot/sc.c
--- a/sys/arch/luna68k/stand/boot/sc.c  Wed Apr 16 07:29:52 2014 +0000
+++ b/sys/arch/luna68k/stand/boot/sc.c  Wed Apr 16 11:18:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sc.c,v 1.10 2014/01/11 15:51:02 tsutsui Exp $  */
+/*     $NetBSD: sc.c,v 1.11 2014/04/16 11:18:00 tsutsui Exp $  */
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -403,7 +403,6 @@
 {
        struct scsidevice *hd = hs->sc_spc;
        int len;
-       u_char junk;
 
        printf("sc%d: abort  phase=0x%x, ssts=0x%x, ints=0x%x\n",
                hs->sc_ctlr, hd->scsi_psns, hd->scsi_ssts,
@@ -438,7 +437,7 @@
                        hd->scsi_scmd = SCMD_SET_ACK;
                        while (hd->scsi_psns & PSNS_REQ)
                                DELAY(1);
-                       junk = hd->scsi_temp;
+                       (void)hd->scsi_temp;
                } else {
                        /* one of the output phases - send an abort msg */
                        hd->scsi_temp = MSG_ABORT;



Home | Main Index | Thread Index | Old Index