Hello,

In azalia_set_params_sub() the cmode variable is only used by
DPRINTF() so we can avoid declaring it when debugging is not
enabled.

- Michael


Index: azalia.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/azalia.c,v
retrieving revision 1.240
diff -u -p -u -r1.240 azalia.c
--- azalia.c    10 Jan 2018 09:00:40 -0000      1.240
+++ azalia.c    21 Mar 2018 04:51:01 -0000
@@ -3905,14 +3905,11 @@ azalia_match_format(codec_t *codec, int 
 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;

Reply via email to