From 3af45cb31574b17091243a1362500d7ecd08c6f1 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Sun, 22 Apr 2018 09:51:28 +0000 Subject: Wrap debug-only variable definition in #ifdef AZALIA_DEBUG. From Michael W. Bombardieri. Thanks. --- sys/dev/pci/azalia.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index 31e45786575..a370a696a80 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.c,v 1.242 2018/04/11 04:48:31 ratchov Exp $ */ +/* $OpenBSD: azalia.c,v 1.243 2018/04/22 09:51:27 ratchov Exp $ */ /* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */ /*- @@ -3832,14 +3832,11 @@ azalia_match_format(codec_t *codec, int mode, audio_params_t *par) int azalia_set_params_sub(codec_t *codec, int mode, audio_params_t *par) { - char *cmode; int i, j; uint ochan, oenc, opre; - - if (mode == AUMODE_PLAY) - cmode = "play"; - else - cmode = "record"; +#ifdef AZALIA_DEBUG + char *cmode = (mode == AUMODE_PLAY) ? "play" : "record"; +#endif ochan = par->channels; oenc = par->encoding; -- cgit v1.2.3