avoid set but unused variables.

move variables under their usage #ifdef.
This commit is contained in:
mrg 2014-03-11 08:19:45 +00:00
parent bd5df6a9bf
commit 56d2939512
5 changed files with 19 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: gdium_intr.c,v 1.5 2011/07/10 00:03:53 matt Exp $ */
/* $NetBSD: gdium_intr.c,v 1.6 2014/03/11 08:19:45 mrg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gdium_intr.c,v 1.5 2011/07/10 00:03:53 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: gdium_intr.c,v 1.6 2014/03/11 08:19:45 mrg Exp $");
#define __INTR_PRIVATE
@ -299,7 +299,6 @@ evbmips_intr_disestablish(void *cookie)
void
evbmips_iointr(int ipl, vaddr_t pc, uint32_t ipending)
{
const struct gdium_irqmap *irqmap;
struct evbmips_intrhand *ih;
int level;
uint32_t isr;
@ -315,7 +314,6 @@ evbmips_iointr(int ipl, vaddr_t pc, uint32_t ipending)
continue;
gdium_cpuintrs[level].cintr_count.ev_count++;
LIST_FOREACH (ih, &gdium_cpuintrs[level].cintr_list, ih_q) {
irqmap = &gdium_irqmap[ih->ih_irq];
if (isr & (1 << ih->ih_irq)) {
gdium_intrtab[ih->ih_irq].intr_count.ev_count++;
(*ih->ih_func)(ih->ih_arg);

View File

@ -1,4 +1,4 @@
/* $NetBSD: bonito_pci.c,v 1.10 2011/08/27 12:59:16 bouyer Exp $ */
/* $NetBSD: bonito_pci.c,v 1.11 2014/03/11 08:19:45 mrg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bonito_pci.c,v 1.10 2011/08/27 12:59:16 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: bonito_pci.c,v 1.11 2014/03/11 08:19:45 mrg Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@ -139,7 +139,7 @@ bonito_conf_read(void *v, pcitag_t tag, int offset)
{
struct bonito_config *bc = v;
pcireg_t data;
u_int32_t cfgoff, dummy, pcimap_cfg;
u_int32_t cfgoff, pcimap_cfg;
int s;
if (bonito_conf_addr(bc, tag, offset, &cfgoff, &pcimap_cfg))
@ -156,7 +156,7 @@ bonito_conf_read(void *v, pcitag_t tag, int offset)
wbflush();
/* Issue a read to make sure the write is posted */
dummy = REGVAL(BONITO_PCIMAP_CFG);
(void)REGVAL(BONITO_PCIMAP_CFG);
/* low 16 bits of address are offset into config space */
data = REGVAL(BONITO_PCICFG_BASE + (cfgoff & 0xfffc));
@ -175,7 +175,7 @@ void
bonito_conf_write(void *v, pcitag_t tag, int offset, pcireg_t data)
{
struct bonito_config *vt = v;
u_int32_t cfgoff, dummy, pcimap_cfg;
u_int32_t cfgoff, pcimap_cfg;
int s;
if (bonito_conf_addr(vt, tag, offset, &cfgoff, &pcimap_cfg))
@ -192,7 +192,7 @@ bonito_conf_write(void *v, pcitag_t tag, int offset, pcireg_t data)
wbflush();
/* Issue a read to make sure the write is posted */
dummy = REGVAL(BONITO_PCIMAP_CFG);
(void)REGVAL(BONITO_PCIMAP_CFG);
/* low 16 bits of address are offset into config space */
REGVAL(BONITO_PCICFG_BASE + (cfgoff & 0xfffc)) = data;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rmixl_pcix.c,v 1.10 2012/10/27 17:18:03 chs Exp $ */
/* $NetBSD: rmixl_pcix.c,v 1.11 2014/03/11 08:19:45 mrg Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.10 2012/10/27 17:18:03 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.11 2014/03/11 08:19:45 mrg Exp $");
#include "opt_pci.h"
#include "pci.h"
@ -385,11 +385,14 @@ rmixl_pcix_attach(device_t parent, device_t self, void *aux)
* check PCI-X interface byteswap setup
* ensure 'Match Byte Lane' is disabled
*/
uint32_t mble, mba, mbs;
uint32_t mble;
mble = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_XLR_MBLE);
#ifdef PCI_DEBUG
uint32_t mba, mbs;
mba = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_MATCH_BIT_ADDR);
mbs = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_MATCH_BIT_SIZE);
DPRINTF(("%s: MBLE=%#x, MBA=%#x, MBS=%#x\n", __func__, mble, mba, mbs));
#endif
if ((mble & __BIT(40)) != 0)
RMIXL_PCIXREG_WRITE(RMIXL_PCIX_ECFG_XLR_MBLE, 0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rmixlvar.h,v 1.6 2011/07/01 19:01:31 dyoung Exp $ */
/* $NetBSD: rmixlvar.h,v 1.7 2014/03/11 08:19:45 mrg Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -208,14 +208,13 @@ rmixl_cache_err_check(void)
static inline int
rmixl_probe_4(volatile uint32_t *va)
{
uint32_t tmp;
uint32_t r;
int err;
int s;
s = splhigh();
r = rmixl_cache_err_dis();
tmp = *va; /* probe */
(void)*va; /* probe */
err = rmixl_cache_err_check();
rmixl_cache_err_restore(r);
splx(s);

View File

@ -1,4 +1,4 @@
/* $NetBSD: voyagerfb.c,v 1.26 2013/07/30 19:21:50 macallan Exp $ */
/* $NetBSD: voyagerfb.c,v 1.27 2014/03/11 08:19:45 mrg Exp $ */
/*
* Copyright (c) 2009, 2011 Michael Lorenz
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.26 2013/07/30 19:21:50 macallan Exp $");
__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.27 2014/03/11 08:19:45 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1065,7 +1065,7 @@ voyagerfb_putchar_aa8(void *cookie, int row, int col, u_int c, long attr)
struct vcons_screen *scr = ri->ri_hw;
struct voyagerfb_softc *sc = scr->scr_cookie;
uint32_t cmd;
int fg, bg;
int bg;
uint8_t *data;
int x, y, wi, he;
int i, j, r, g, b, aval, pad;
@ -1083,7 +1083,6 @@ voyagerfb_putchar_aa8(void *cookie, int row, int col, u_int c, long attr)
he = font->fontheight;
bg = ri->ri_devcmap[(attr >> 16) & 0x0f];
fg = ri->ri_devcmap[(attr >> 24) & 0x0f];
x = ri->ri_xorigin + col * wi;
y = ri->ri_yorigin + row * he;
if (c == 0x20) {