fix unused warnings

This commit is contained in:
christos 2013-11-07 17:50:18 +00:00
parent e9af1dcdbe
commit b1f1b4f3f7
4 changed files with 17 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: si_sebuf.c,v 1.28 2009/11/21 04:16:52 rmind Exp $ */
/* $NetBSD: si_sebuf.c,v 1.29 2013/11/07 17:50:18 christos Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: si_sebuf.c,v 1.28 2009/11/21 04:16:52 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: si_sebuf.c,v 1.29 2013/11/07 17:50:18 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -526,11 +526,10 @@ se_intr(void *arg)
{
struct se_softc *sc = arg;
volatile struct se_regs *se = sc->sc_regs;
int dma_error, claimed;
int claimed;
u_short csr;
claimed = 0;
dma_error = 0;
/* SBC interrupt? DMA interrupt? */
csr = se->se_csr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: xy.c,v 1.72 2011/02/01 20:19:32 chuck Exp $ */
/* $NetBSD: xy.c,v 1.73 2013/11/07 17:50:18 christos Exp $ */
/*
* Copyright (c) 1995 Charles D. Cranor
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.72 2011/02/01 20:19:32 chuck Exp $");
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.73 2013/11/07 17:50:18 christos Exp $");
#undef XYC_DEBUG /* full debug */
#undef XYC_DIAG /* extra sanity checks */
@ -1241,7 +1241,6 @@ xyc_cmd(struct xyc_softc *xycsc, int cmd, int subfn, int unit, int block,
int
xyc_startbuf(struct xyc_softc *xycsc, struct xy_softc *xysc, struct buf *bp)
{
int partno;
struct xy_iorq *iorq;
struct xy_iopb *iopb;
u_long block;
@ -1255,8 +1254,8 @@ xyc_startbuf(struct xyc_softc *xycsc, struct xy_softc *xysc, struct buf *bp)
if (bp == NULL)
panic("%s null buf", __func__);
partno = DISKPART(bp->b_dev);
#ifdef XYC_DEBUG
int partno = DISKPART(bp->b_dev);
printf("%s: %s%c: %s block %d\n", __func__, device_xname(xysc->sc_dev),
'a' + partno, (bp->b_flags & B_READ) ? "read" : "write",
(int)bp->b_blkno);

View File

@ -1,4 +1,4 @@
/* $NetBSD: dvma.c,v 1.39 2013/09/07 15:56:11 tsutsui Exp $ */
/* $NetBSD: dvma.c,v 1.40 2013/11/07 17:50:18 christos Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dvma.c,v 1.39 2013/09/07 15:56:11 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: dvma.c,v 1.40 2013/11/07 17:50:18 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -239,7 +239,7 @@ dvma_mapout(void *dma, int len)
vaddr_t seg_dma;
vsize_t seg_len, seg_off;
vaddr_t v, x;
int sme;
int sme __diagused;
int s;
/* Get seg-aligned address and length. */
@ -292,7 +292,7 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dmamap_t map, void *buf,
vsize_t off, sgsize;
paddr_t pa;
pmap_t pmap;
int error, rv, s;
int error, rv __diagused, s;
/*
* Make sure that on error condition we return "no valid mappings".
@ -356,7 +356,7 @@ _bus_dmamap_unload(bus_dma_tag_t t, bus_dmamap_t map)
bus_dma_segment_t *segs;
vaddr_t dva;
vsize_t sgsize;
int error, s;
int error __diagused, s;
#ifdef DIAGNOSTIC
if (map->dm_nsegs != 1)

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.169 2013/09/07 15:56:11 tsutsui Exp $ */
/* $NetBSD: pmap.c,v 1.170 2013/11/07 17:50:18 christos Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.169 2013/09/07 15:56:11 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.170 2013/11/07 17:50:18 christos Exp $");
#include "opt_ddb.h"
#include "opt_pmap_debug.h"
@ -3044,9 +3044,8 @@ out:
void
pmap_protect_mmu(pmap_t pmap, vaddr_t sva, vaddr_t eva)
{
pmeg_t pmegp;
vaddr_t pgva, segva;
int pte, sme;
int pte;
#ifdef HAVECACHE
int flush_by_page = 0;
#endif
@ -3061,9 +3060,9 @@ pmap_protect_mmu(pmap_t pmap, vaddr_t sva, vaddr_t eva)
#endif
segva = sun3_trunc_seg(sva);
sme = get_segmap(segva);
#ifdef DIAGNOSTIC
int sme = get_segmap(segva);
/* Make sure it is valid and known. */
if (sme == SEGINV)
panic("pmap_protect_mmu: SEGINV");
@ -3071,10 +3070,10 @@ pmap_protect_mmu(pmap_t pmap, vaddr_t sva, vaddr_t eva)
panic("pmap_protect_mmu: incorrect sme, va=0x%lx", segva);
#endif
pmegp = pmeg_p(sme);
/* have pmeg, will travel */
#ifdef DIAGNOSTIC
/* have pmeg, will travel */
pmeg_t pmegp = pmeg_p(sme);
/* Make sure we own the pmeg, right va, etc. */
if ((pmegp->pmeg_va != segva) ||
(pmegp->pmeg_owner != pmap) ||