From 09f9a0bb6b3cc62a30f3da16ac4dca91eb5121f3 Mon Sep 17 00:00:00 2001 From: miko Date: Fri, 31 Aug 2018 07:18:18 +0000 Subject: [PATCH] ich variable is only used in DPRINTF() and uaudio_get_cluster_nchan() has no side effect, so setting value for ich can be moved under UAUDIO_DEBUG. ok ratchov --- sys/dev/usb/uaudio.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c index c140cad526a..e0cdbfd39ef 100644 --- a/sys/dev/usb/uaudio.c +++ b/sys/dev/usb/uaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uaudio.c,v 1.132 2018/08/08 14:25:50 ratchov Exp $ */ +/* $OpenBSD: uaudio.c,v 1.133 2018/08/31 07:18:18 miko Exp $ */ /* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */ /* @@ -750,17 +750,21 @@ uaudio_add_mixer(struct uaudio_softc *sc, const struct io_terminal *iot, int id) { const struct usb_audio_mixer_unit *d = iot[id].d.mu; struct usb_audio_mixer_unit_1 *d1; - int c, chs, ichs, ochs, i, o, bno, p, mo, mc, k; + int c, chs, ochs, i, o, bno, p, mo, mc, k; +#ifdef UAUDIO_DEBUG + int ichs = 0; +#endif uByte *bm; struct mixerctl mix; DPRINTFN(2,("%s: bUnitId=%d bNrInPins=%d\n", __func__, d->bUnitId, d->bNrInPins)); +#ifdef UAUDIO_DEBUG /* Compute the number of input channels */ - ichs = 0; for (i = 0; i < d->bNrInPins; i++) ichs += uaudio_get_cluster_nchan(d->baSourceId[i], iot); +#endif /* and the number of output channels */ d1 = (struct usb_audio_mixer_unit_1 *)&d->baSourceId[d->bNrInPins]; -- 2.20.1