Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys fix unused variable warnings
details: https://anonhg.NetBSD.org/src/rev/aaa2ca4edf76
branches: trunk
changeset: 791199:aaa2ca4edf76
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 08 03:12:17 2013 +0000
description:
fix unused variable warnings
diffstat:
sys/arch/i386/i386/machdep.c | 7 +++----
sys/arch/i386/i386/mainbus.c | 6 ++++--
sys/arch/i386/pci/elan520.c | 7 +++----
sys/dev/ic/interwave.c | 5 +++--
sys/dev/isa/if_iy.c | 7 +++++--
sys/dev/isa/ym.c | 6 ++++--
sys/dev/mca/if_tr_mca.c | 5 +++--
sys/dev/usb/if_upgt.c | 6 ++++--
sys/dev/usb/xhci.c | 8 ++++----
9 files changed, 33 insertions(+), 24 deletions(-)
diffs (288 lines):
diff -r fcbdb029d966 -r aaa2ca4edf76 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c Fri Nov 08 02:47:41 2013 +0000
+++ b/sys/arch/i386/i386/machdep.c Fri Nov 08 03:12:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.736 2013/11/08 02:24:11 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.737 2013/11/08 03:12:48 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.736 2013/11/08 02:24:11 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.737 2013/11/08 03:12:48 christos Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@@ -1162,7 +1162,6 @@
init386(paddr_t first_avail)
{
extern void consinit(void);
- struct pcb *pcb;
int x;
#ifndef XEN
union descriptor *tgdt;
@@ -1184,7 +1183,6 @@
cpu_probe(&cpu_info_primary);
uvm_lwp_setuarea(&lwp0, lwp0uarea);
- pcb = lwp_getpcb(&lwp0);
cpu_init_msrs(&cpu_info_primary, true);
@@ -1195,6 +1193,7 @@
#endif
#ifdef XEN
+ struct pcb *pcb = lwp_getpcb(&lwp0);
pcb->pcb_cr3 = PDPpaddr;
__PRINTK(("pcb_cr3 0x%lx cr3 0x%lx\n",
PDPpaddr, xpmap_ptom(PDPpaddr)));
diff -r fcbdb029d966 -r aaa2ca4edf76 sys/arch/i386/i386/mainbus.c
--- a/sys/arch/i386/i386/mainbus.c Fri Nov 08 02:47:41 2013 +0000
+++ b/sys/arch/i386/i386/mainbus.c Fri Nov 08 03:12:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.97 2013/07/31 14:05:33 soren Exp $ */
+/* $NetBSD: mainbus.c,v 1.98 2013/11/08 03:12:48 christos Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.97 2013/07/31 14:05:33 soren Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.98 2013/11/08 03:12:48 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -242,6 +242,8 @@
pci_addr_fixup(NULL, pci_maxbus);
#endif
}
+#else
+ __USE(mode);
#endif
#endif
diff -r fcbdb029d966 -r aaa2ca4edf76 sys/arch/i386/pci/elan520.c
--- a/sys/arch/i386/pci/elan520.c Fri Nov 08 02:47:41 2013 +0000
+++ b/sys/arch/i386/pci/elan520.c Fri Nov 08 03:12:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: elan520.c,v 1.49 2011/07/01 17:37:26 dyoung Exp $ */
+/* $NetBSD: elan520.c,v 1.50 2013/11/08 03:12:48 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: elan520.c,v 1.49 2011/07/01 17:37:26 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: elan520.c,v 1.50 2013/11/08 03:12:48 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -693,7 +693,6 @@
elansc_protect_text(device_t self, struct elansc_softc *sc)
{
int i, j, nregion, pidx, tidx = 0, xnregion;
- uint32_t par;
uint32_t protsize, unprotsize;
paddr_t start_pa, end_pa;
extern char kernel_text, etext;
@@ -722,7 +721,7 @@
return;
}
- par = bus_space_read_4(memt, memh, MMCR_PAR(pidx));
+ (void) bus_space_read_4(memt, memh, MMCR_PAR(pidx));
aprint_debug_dev(self,
"protect kernel text at physical addresses "
diff -r fcbdb029d966 -r aaa2ca4edf76 sys/dev/ic/interwave.c
--- a/sys/dev/ic/interwave.c Fri Nov 08 02:47:41 2013 +0000
+++ b/sys/dev/ic/interwave.c Fri Nov 08 03:12:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: interwave.c,v 1.37 2012/10/27 17:18:20 chs Exp $ */
+/* $NetBSD: interwave.c,v 1.38 2013/11/08 03:12:17 christos Exp $ */
/*
* Copyright (c) 1997, 1999, 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: interwave.c,v 1.37 2012/10/27 17:18:20 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interwave.c,v 1.38 2013/11/08 03:12:17 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -576,6 +576,7 @@
IW_READ_CODEC_1(CRDFI, reg);
DPRINTF((" CRDFI %x ", reg));
+ __USE(reg);
return freq;
}
diff -r fcbdb029d966 -r aaa2ca4edf76 sys/dev/isa/if_iy.c
--- a/sys/dev/isa/if_iy.c Fri Nov 08 02:47:41 2013 +0000
+++ b/sys/dev/isa/if_iy.c Fri Nov 08 03:12:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iy.c,v 1.91 2012/10/27 17:18:24 chs Exp $ */
+/* $NetBSD: if_iy.c,v 1.92 2013/11/08 03:12:17 christos Exp $ */
/* #define IYDEBUG */
/* #define IYMEMDEBUG */
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.91 2012/10/27 17:18:24 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.92 2013/11/08 03:12:17 christos Exp $");
#include "opt_inet.h"
@@ -1088,6 +1088,8 @@
printf("%s: pck at 0x%04x stat %s next 0x%x len 0x%x\n",
device_xname(sc->sc_dev), rxadrs, sbuf, rxnext, rxlen);
}
+#else
+ __USE(rxstatus);
#endif
iyget(sc, iot, ioh, rxlen);
@@ -1346,6 +1348,7 @@
ETHER_NEXT_MULTI(step, enm);
}
dum = bus_space_read_2(iot, ioh, MEM_PORT_REG); /* dummy read */
+ __USE(dum);
bus_space_write_2(iot, ioh, XMT_ADDR_REG, last);
bus_space_write_1(iot, ioh, 0, MC_SETUP_CMD);
diff -r fcbdb029d966 -r aaa2ca4edf76 sys/dev/isa/ym.c
--- a/sys/dev/isa/ym.c Fri Nov 08 02:47:41 2013 +0000
+++ b/sys/dev/isa/ym.c Fri Nov 08 03:12:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ym.c,v 1.43 2011/11/24 03:35:58 mrg Exp $ */
+/* $NetBSD: ym.c,v 1.44 2013/11/08 03:12:17 christos Exp $ */
/*-
* Copyright (c) 1999-2002, 2008 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ym.c,v 1.43 2011/11/24 03:35:58 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ym.c,v 1.44 2013/11/08 03:12:17 christos Exp $");
#include "mpu_ym.h"
#include "opt_ym.h"
@@ -505,6 +505,8 @@
/* Notify the change to async processes. */
if (changed && sc->sc_audiodev)
mixer_signal(sc->sc_audiodev);
+#else
+ __USE(changed);
#endif
}
diff -r fcbdb029d966 -r aaa2ca4edf76 sys/dev/mca/if_tr_mca.c
--- a/sys/dev/mca/if_tr_mca.c Fri Nov 08 02:47:41 2013 +0000
+++ b/sys/dev/mca/if_tr_mca.c Fri Nov 08 03:12:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tr_mca.c,v 1.22 2012/10/27 17:18:26 chs Exp $ */
+/* $NetBSD: if_tr_mca.c,v 1.23 2013/11/08 03:12:17 christos Exp $ */
/*_
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.22 2012/10/27 17:18:26 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.23 2013/11/08 03:12:17 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -117,6 +117,7 @@
pos3 = mca_conf_read(ma->ma_mc, ma->ma_slot, 3);
pos4 = mca_conf_read(ma->ma_mc, ma->ma_slot, 4);
pos5 = mca_conf_read(ma->ma_mc, ma->ma_slot, 5);
+ __USE(pos5);
/*
* POS register 2: (adf pos0)
diff -r fcbdb029d966 -r aaa2ca4edf76 sys/dev/usb/if_upgt.c
--- a/sys/dev/usb/if_upgt.c Fri Nov 08 02:47:41 2013 +0000
+++ b/sys/dev/usb/if_upgt.c Fri Nov 08 03:12:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_upgt.c,v 1.9 2013/03/30 03:15:53 christos Exp $ */
+/* $NetBSD: if_upgt.c,v 1.10 2013/11/08 03:12:17 christos Exp $ */
/* $OpenBSD: if_upgt.c,v 1.49 2010/04/20 22:05:43 tedu Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_upgt.c,v 1.9 2013/03/30 03:15:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_upgt.c,v 1.10 2013/11/08 03:12:17 christos Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@@ -1137,6 +1137,7 @@
DPRINTF(2, "%s: flags=0x%02x\n", device_xname(sc->sc_dev), flags);
DPRINTF(2, "%s: elements=%d\n", device_xname(sc->sc_dev), elements);
+ __USE(flags);
for (i = 0; i < elements; i++) {
channel = ieee80211_mhz2ieee(le16toh(freq3[i].freq), 0);
@@ -1171,6 +1172,7 @@
DPRINTF(2, "%s: flags=0x%02x\n", device_xname(sc->sc_dev), flags);
DPRINTF(2, "%s: elements=%d\n", device_xname(sc->sc_dev), elements);
DPRINTF(2, "%s: settings=%d\n", device_xname(sc->sc_dev), settings);
+ __USE(flags);
for (i = 0; i < elements; i++) {
channel = ieee80211_mhz2ieee(le16toh(freq4_1[i].freq), 0);
diff -r fcbdb029d966 -r aaa2ca4edf76 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c Fri Nov 08 02:47:41 2013 +0000
+++ b/sys/dev/usb/xhci.c Fri Nov 08 03:12:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci.c,v 1.6 2013/11/04 08:08:58 skrll Exp $ */
+/* $NetBSD: xhci.c,v 1.7 2013/11/08 03:12:17 christos Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.6 2013/11/04 08:08:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.7 2013/11/08 03:12:17 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -570,7 +570,7 @@
xhci_init(struct xhci_softc *sc)
{
bus_size_t bsz;
- uint32_t cap, hcs1, hcs2, hcs3, hcc, dboff, rtsoff;
+ uint32_t cap, hcs1, hcs2, hcc, dboff, rtsoff;
uint32_t ecp, ecr;
uint32_t usbcmd, usbsts, pagesize, config;
int i;
@@ -605,7 +605,7 @@
sc->sc_maxintrs = XHCI_HCS1_MAXINTRS(hcs1);
sc->sc_maxports = XHCI_HCS1_MAXPORTS(hcs1);
hcs2 = xhci_cap_read_4(sc, XHCI_HCSPARAMS2);
- hcs3 = xhci_cap_read_4(sc, XHCI_HCSPARAMS3);
+ (void)xhci_cap_read_4(sc, XHCI_HCSPARAMS3);
hcc = xhci_cap_read_4(sc, XHCI_HCCPARAMS);
sc->sc_ac64 = XHCI_HCC_AC64(hcc);
Home |
Main Index |
Thread Index |
Old Index