Module Name: src Committed By: nat Date: Tue May 15 10:23:03 UTC 2018
Modified Files: src/sys/dev: audio.c Log Message: Fix over cautious compiler error - setmode may not be initialized. To generate a diff of this commit: cvs rdiff -u -r1.454 -r1.455 src/sys/dev/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/audio.c diff -u src/sys/dev/audio.c:1.454 src/sys/dev/audio.c:1.455 --- src/sys/dev/audio.c:1.454 Tue May 15 00:28:00 2018 +++ src/sys/dev/audio.c Tue May 15 10:23:03 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.454 2018/05/15 00:28:00 nat Exp $ */ +/* $NetBSD: audio.c,v 1.455 2018/05/15 10:23:03 nat Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss <nathanialsl...@yahoo.com.au> @@ -148,7 +148,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.454 2018/05/15 00:28:00 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.455 2018/05/15 10:23:03 nat Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -4567,6 +4567,7 @@ audiosetinfo(struct audio_softc *sc, str pp = vc->sc_pparams; /* Temporary encoding storage in */ rp = vc->sc_rparams; /* case setting the modes fails. */ nr = np = 0; + setmode = 0; if (vc == &sc->sc_mixring) goto done; @@ -4624,7 +4625,6 @@ audiosetinfo(struct audio_softc *sc, str if (np > 0 && (error = audio_check_params(&pp))) return error; - setmode = 0; if (nr > 0) { if (!cleared) { audio_clear_intr_unlocked(sc, vc);