Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src fix unused variable warnings
details: https://anonhg.NetBSD.org/src/rev/c5fa72a72f3c
branches: trunk
changeset: 791241:c5fa72a72f3c
user: christos <christos%NetBSD.org@localhost>
date: Sat Nov 09 21:41:03 2013 +0000
description:
fix unused variable warnings
diffstat:
lib/libm/noieee_src/n_gamma.c | 3 ++-
sys/arch/vax/boot/boot/if_ni.c | 10 +++++-----
sys/arch/vax/boot/boot/mfm.c | 24 +++++++++++-------------
sys/arch/vax/boot/boot/ra.c | 3 ++-
4 files changed, 20 insertions(+), 20 deletions(-)
diffs (181 lines):
diff -r 5bf8b32344f7 -r c5fa72a72f3c lib/libm/noieee_src/n_gamma.c
--- a/lib/libm/noieee_src/n_gamma.c Sat Nov 09 21:39:27 2013 +0000
+++ b/lib/libm/noieee_src/n_gamma.c Sat Nov 09 21:41:03 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: n_gamma.c,v 1.8 2012/06/08 11:13:33 abs Exp $ */
+/* $NetBSD: n_gamma.c,v 1.9 2013/11/09 21:41:03 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -158,6 +158,7 @@
else return (one/x);
}
b =one+1e-20; /* Raise inexact flag. ??? -ragge */
+ __USE(b);
return (one/x);
} else if (!finite(x)) {
if (_IEEE) /* x = NaN, -Inf */
diff -r 5bf8b32344f7 -r c5fa72a72f3c sys/arch/vax/boot/boot/if_ni.c
--- a/sys/arch/vax/boot/boot/if_ni.c Sat Nov 09 21:39:27 2013 +0000
+++ b/sys/arch/vax/boot/boot/if_ni.c Sat Nov 09 21:41:03 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ni.c,v 1.9 2011/07/03 08:56:25 mrg Exp $ */
+/* $NetBSD: if_ni.c,v 1.10 2013/11/09 21:41:03 christos Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -193,7 +193,7 @@
struct ni_dg *data;
struct ni_msg *msg;
struct ni_ptdb *ptdb;
- int i, va, res;
+ int i, va;
struct ni_param *nip;
if (beenhere++ && askname == 0)
@@ -288,7 +288,7 @@
for (i = 0; i < NMSGBUF; i++) {
msg = (void *)(va + i * 512);
- res = INSQTI(msg, &fqb->nf_mforw);
+ (void)INSQTI(msg, &fqb->nf_mforw);
}
WAITREG(NI_PCR, PCR_OWN);
NI_WREG(NI_PCR, PCR_FREEQNE|PCR_MFREEQ|PCR_OWN);
@@ -317,7 +317,7 @@
allocbase += 2048;
data->bufs[0]._index = i;
- res = INSQTI(data, &fqb->nf_dforw);
+ (void)INSQTI(data, &fqb->nf_dforw);
}
WAITREG(NI_PCR, PCR_OWN);
NI_WREG(NI_PCR, PCR_FREEQNE|PCR_DFREEQ|PCR_OWN);
@@ -352,7 +352,7 @@
data->bufs[0]._len = bd->nb_len;
data->bufs[0]._index = idx;
- res = INSQTI(data, &fqb->nf_rforw);
+ (void)INSQTI(data, &fqb->nf_rforw);
}
WAITREG(NI_PCR, PCR_OWN);
NI_WREG(NI_PCR, PCR_FREEQNE|PCR_RFREEQ|PCR_OWN);
diff -r 5bf8b32344f7 -r c5fa72a72f3c sys/arch/vax/boot/boot/mfm.c
--- a/sys/arch/vax/boot/boot/mfm.c Sat Nov 09 21:39:27 2013 +0000
+++ b/sys/arch/vax/boot/boot/mfm.c Sat Nov 09 21:41:03 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfm.c,v 1.13 2009/10/26 19:16:58 cegger Exp $ */
+/* $NetBSD: mfm.c,v 1.14 2013/11/09 21:41:03 christos Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -240,7 +240,7 @@
int
mfm_command(int cmd)
{
- int termcode, ready, i;
+ int termcode, i;
creg_write(); /* write command-registers */
*ka410_intclr = INTR_DC;
@@ -280,7 +280,6 @@
goto retry;
}
termcode = (dkc->dkc_stat & DKC_ST_TERMCOD) >> 3;
- ready = sreg.udc_dstat & UDC_DS_READY;
printf("cmd:0x%x: termcode=0x%x, status=0x%x, cstat=0x%x, dstat=0x%x\n",
cmd, termcode, dkc->dkc_stat, sreg.udc_cstat, sreg.udc_dstat);
@@ -456,7 +455,7 @@
mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) {
struct mfm_softc *msc = f;
struct disklabel *lp;
- int block, sect, head, cyl, scount, res;
+ int block, sect, head, cyl, scount;
char *cbuf;
cbuf = (char*)buf;
@@ -517,7 +516,7 @@
mfm_rxprepare();
/* copy from buf */
memcpy((void *) 0x200D0000, cbuf, *rsize);
- res = mfm_command(DKC_CMD_WRITE_RX33);
+ (void)mfm_command(DKC_CMD_WRITE_RX33);
} else {
creg.udc_rtcnt = UDC_RC_RX33READ;
creg.udc_mode = UDC_MD_RX33;
@@ -526,7 +525,7 @@
mfm_rxprepare();
/* clear disk buffer */
memset((void *) 0x200D0000, 0, *rsize);
- res = mfm_command(DKC_CMD_READ_RX33);
+ (void)mfm_command(DKC_CMD_READ_RX33);
/* copy to buf */
memcpy(cbuf, (void *) 0x200D0000, *rsize);
}
@@ -544,7 +543,7 @@
mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) {
struct mfm_softc *msc = f;
struct disklabel *lp;
- int block, sect, head, cyl, scount, cmd, res;
+ int block, sect, head, cyl, scount, cmd;
char *cbuf;
cbuf = (char *)buf;
@@ -608,7 +607,7 @@
cmd = DKC_CMD_WRITE_HDD;
memcpy((void *) 0x200D0000, cbuf, *rsize);
- res = mfm_command(cmd);
+ (void)mfm_command(cmd);
} else {
creg.udc_rtcnt = UDC_RC_HDD_READ;
creg.udc_mode = UDC_MD_HDD;
@@ -616,7 +615,7 @@
cmd = DKC_CMD_READ_HDD;
memset((void *) 0x200D0000, 0, *rsize);
- res = mfm_command(cmd);
+ (void)mfm_command(cmd);
memcpy(cbuf, (void *) 0x200D0000, *rsize);
}
@@ -638,18 +637,17 @@
mfmstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize)
{
struct mfm_softc *msc = f;
- int res = -1;
switch (msc->unit) {
case 0:
case 1:
- res = mfm_rdstrategy(f, func, dblk, size, buf, rsize);
+ return mfm_rdstrategy(f, func, dblk, size, buf, rsize);
break;
case 2:
- res = mfm_rxstrategy(f, func, dblk, size, buf, rsize);
+ return mfm_rxstrategy(f, func, dblk, size, buf, rsize);
break;
default:
printf("invalid unit %d in mfmstrategy()\n", msc->unit);
+ return -1;
}
- return (res);
}
diff -r 5bf8b32344f7 -r c5fa72a72f3c sys/arch/vax/boot/boot/ra.c
--- a/sys/arch/vax/boot/boot/ra.c Sat Nov 09 21:39:27 2013 +0000
+++ b/sys/arch/vax/boot/boot/ra.c Sat Nov 09 21:41:03 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ra.c,v 1.18 2009/03/18 16:00:15 cegger Exp $ */
+/* $NetBSD: ra.c,v 1.19 2013/11/09 21:41:03 christos Exp $ */
/*
* Copyright (c) 1995 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -242,6 +242,7 @@
printf("sending cmd %x...", cmd);
#endif
hej = *ra_ip;
+ __USE(hej);
to = 10000000;
while (uda.uda_ca.ca_rspdsc < 0) {
// if (uda.uda_ca.ca_cmdint)
Home |
Main Index |
Thread Index |
Old Index