NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/52434: Dead code in audio_set_params()
>Number: 52434
>Category: kern
>Synopsis: Dead code in audio_set_params()
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 27 09:05:00 +0000 2017
>Originator: Tetsuya Isaki
>Release: NetBSD-current
>Organization:
NetBSD
>Environment:
source code review
>Description:
Assignment to local variables play and rec has no effect
at line 5877 and 5884.
5849 audio_set_params(struct audio_softc *sc, int setmode, int usemode,
5850 audio_params_t *play, audio_params_t *rec,
5851 stream_filter_list_t *pfil, stream_filter_list_t *rfil,
5852 struct virtual_channel *vc)
5853 {
:
5872 if (setmode & AUMODE_PLAY && auconv_set_converter(sc->sc_format,
5873 VAUDIO_NFORMATS, AUMODE_PLAY, play, true, pfil) < 0)
5874 return EINVAL;
5875
5876 if (pfil->req_size > 0)
5877 play = &pfil->filters[0].param;
5878
5879 if (setmode & AUMODE_RECORD && auconv_set_converter(sc->sc_format,
5880 VAUDIO_NFORMATS, AUMODE_RECORD, rec, true, rfil) < 0)
5881 return EINVAL;
5882
5883 if (rfil->req_size > 0)
5884 rec = &rfil->filters[0].param;
5885
5886 return 0;
5887 }
>How-To-Repeat:
see source code.
>Fix:
N/A
Home |
Main Index |
Thread Index |
Old Index